butterworth

butterworth(dx, order, cutoff, /, btype='low')[source]

Applies Butterworth filter to data. Since this is a recursive filter, non-trivial to apply, so this uses scipy ‘lfilter’.

To get an ‘impulse response function’, pass a bunch of zeros with a single non-zero ‘point’ as the dx. See Libby’s function for more details.

Parameters
  • dx (float) – Data spacing.

  • order (int) – Order of the filter.

  • cutoff (float) – Cutoff frequency in ‘x’ units (i.e. wavelengths).

Returns

  • b (array-like) – Numerator coeffs.

  • a (array-like) – Denominator coeffs.