obspy.signal.filter.bandstop

bandstop(data, freqmin, freqmax, df, corners=4, zerophase=False)[source]

Butterworth-Bandstop Filter.

Filter data removing data between frequencies freqmin and freqmax using corners corners. The filter uses scipy.signal.iirfilter() (for design) and scipy.signal.sosfilt() (for applying the filter).

Parameters
  • data (numpy.ndarray) – Data to filter.

  • freqmin – Stop band low corner frequency.

  • freqmax – Stop band high corner frequency.

  • df – Sampling rate in Hz.

  • corners – Filter corners / order.

  • zerophase – If True, apply filter once forwards and once backwards. This results in twice the number of corners but zero phase shift in the resulting filtered trace.

Returns

Filtered data.