Digital signal processing

Filtering

class sdr.FIR

Implements a finite impulse response (FIR) filter.

class sdr.IIR

Implements an infinite impulse response (IIR) filter.

Multirate filtering

class sdr.Interpolator(sdr.FIR)

Implements a polyphase interpolating FIR filter.

class sdr.Decimator(sdr.FIR)

Implements a polyphase decimating FIR filter.

class sdr.Resampler(sdr.FIR)

Implements a polyphase rational resampling FIR filter.

sdr.multirate_taps(up: int, down: int = 1, ...) NDArray[float_]

Computes the multirate FIR filter that achieves rational resampling by \(P/Q\).

sdr.polyphase_matrix(up: int, down: int, taps: ArrayLike) NDArray

Converts the multirate FIR filter taps \(h_i\) into the polyphase matrix \(H_{i, j}\) that achieves rational resampling by \(P/Q\).

Arbitrary resampling

class sdr.FarrowResampler

Implements a cubic Farrow arbitrary resampler.

Filtering applications

class sdr.Differentiator(sdr.FIR)

Implements a differentiator FIR filter.

class sdr.Integrator(sdr.IIR)

Implements an integrator IIR filter.

Correlation

Signal manipulation

sdr.mix(x: NDArray, freq: float = 0, ...) NDArray

Mixes the time-domain signal \(x[n]\) with a complex exponential or real sinusoid.

sdr.to_complex_bb(x_r: NDArray[float_]) NDArray[complex_]

Converts the real passband signal \(x_r[n]\) centered at \(f_{s,r}/4\) with sample rate \(f_{s,r}\) to a complex baseband signal \(x_c[n]\) centered at \(0\) with sample rate \(f_{s,c} = f_{s,r}/2\).

sdr.to_real_pb(x_c: NDArray[complex_]) NDArray[float_]

Converts the complex baseband signal \(x_c[n]\) centered at \(0\) with sample rate \(f_{s,c}\) to a real passband signal \(x_r[n]\) centered at \(f_{s,r}/4\) with sample rate \(f_{s,r} = 2f_{s,c}\).

sdr.upsample(x: NDArray, rate: int) NDArray

Upsamples the time-domain signal \(x[n]\) by the factor \(r\).

sdr.downsample(x: NDArray, rate: int) NDArray

Downsamples the time-domain signal \(x[n]\) by the factor \(r\).


Last update: Nov 12, 2023