Digital Signal Processing

The CR-Sparse library has some handy digital signal processing routines implemented in JAX. They are available as part of the cr.sparse.dsp package.

Utilities

time_values

Returns a sequence of time values sampled at a specific frequency for a specific duration

Synthetic Signals

pulse

Generates a pulse signal which is 1 between start and end times and 0 everwhere else

transient_sine_wave

Generates a transient sinusoid between start and end times

decaying_sine_wave

Generates a decaying sinusoid :param fs: Sample rate of signal in Hz.

chirp

Generates a frequency sweep from low to high over time.

chirp_centered

Generates a frequency sweep from low to high over time defined by central frequency and bandwidth.

gaussian_pulse

Generates a Gaussian modulated sinusoid

Discrete Cosine Transform

dct

Computes the 1D Type-II DCT transform

idct

Computes the 1D Type-II Inverse DCT transform

orthonormal_dct

Computes the 1D Type-II DCT transform such that the transform is orthonormal

orthonormal_idct

Computes the 1D Type-II IDCT transform such that the transform is orthonormal

Fast Walsh Hadamard Transform

There is no separate Inverse Fast Walsh Hadamard Transform as FWHT is the inverse of itself except for a normalization factor. In other words, x == fwht(fwht(x)) / n where n is the length of x.

fwht

Computes the Fast Walsh Hadamard Transform over columns