xdas.signal.filter#

xdas.signal.filter(da, freq, btype, corners=4, zerophase=False, dim='last', parallel=None)[source]#

SOS IIR filtering along given dimension.

Parameters:
  • da (DataArray) – Traces to filter.

  • freq (float or list) – Cuttoff frequency or band corners [Hz].

  • btype ({'bandpass', 'lowpass', 'highpass', 'bandstop'}) – The type of the filter.

  • corners (int) – The order of the filter.

  • zerophase (bool) – If True, apply filter once forwards and once backwards. This results in twice the filter order but zero phase shift in the resulting filtered trace.

  • dim (str, optional) – The dimension along which to filter.

  • parallel (bool or int, optional) – Number of threads to use. True uses all cores, False uses one, an int uses that many, None defers to the global xdas configuration. Default is None.

Returns:

Filtered traces.

Return type:

DataArray