Rate
Polyphase resampling
Section titled “Polyphase resampling”Changes the rate by up / down with a Kaiser-windowed FIR, as scipy.signal.resample_poly. The
output has ceil(samples * up / down) samples.
y = dspk.ops.resample.resample_poly(x, 2, 3)The last operation before write.
{"op": "resample", "up": 2, "down": 3}Rate → Resample, as the last op before Write.
Decimate
Section titled “Decimate”Lowers the rate by an integer factor behind an anti-alias filter, as
scipy.signal.decimate(x, q, zero_phase=True). Python only; in a spec, use resample.
lfp = dspk.ops.resample.decimate(x, 30) # (channels, ceil(samples / 30))With ftype="iir", samples near the ends can differ slightly from SciPy’s, which pads differently.
Worked example: Resampling.