Filters
Butterworth
- stride.utils.filters.bandpass_filter_butterworth(data, f_min, f_max, padding=0, order=8, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a Butterworth bandpass filter using cascaded second-order sections.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_min (float) – Minimum frequency of the filter, dimensionless
f_max (float) – Maximum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
order (int, optional) – Order of the filter, defaults to 8.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps+2*padding)
- Return type
n-dimensional array
- stride.utils.filters.lowpass_filter_butterworth(data, f_max, padding=0, order=8, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a Butterworth lowpass filter using cascaded second-order sections.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_max (float) – Maximum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
order (int, optional) – Order of the filter, defaults to 8.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps+2*padding)
- Return type
n-dimensional array
- stride.utils.filters.highpass_filter_butterworth(data, f_min, padding=0, order=8, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a Butterworth highpass filter using cascaded second-order sections.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_min (float) – Minimum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
order (int, optional) – Order of the filter, defaults to 8.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps+2*padding)
- Return type
n-dimensional array
FIR
- stride.utils.filters.bandpass_filter_fir(data, f_min, f_max, padding=0, attenuation=30, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a FIR bandpass filter designed using a kaiser window.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_min (float) – Minimum frequency of the filter, dimensionless
f_max (float) – Minimum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
attenuation (float, optional) – Attenuation of the reject band in dB, defaults to 30.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps+2*padding)
- Return type
n-dimensional array
- stride.utils.filters.lowpass_filter_fir(data, f_max, padding=0, attenuation=30, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a FIR lowpass filter designed using a kaiser window.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_max (float) – Maximum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
attenuation (float, optional) – Attenuation of the reject band in dB, defaults to 30.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps+2*padding)
- Return type
n-dimensional array
- stride.utils.filters.highpass_filter_fir(data, f_min, padding=0, attenuation=30, zero_phase=True, adjoint=False, axis=- 1, **kwargs)[source]
Apply a FIR highpass filter designed using a kaiser window.
- Parameters
data (2-dimensional array) – Data to apply the filter to, with shape (number_of_traces, number_of_timesteps)
f_min (float) – Minimum frequency of the filter, dimensionless
padding (int, optional) – Padding to apply before AND after the traces to compensate for the filtering, defaults to 0.
attenuation (float, optional) – Attenuation of the reject band in dB, defaults to 30.
zero_phase (bool, optional) – Whether the filter should be zero phase, defaults to True.
adjoint (bool, optional) – Whether to run the adjoint of the filter, defaults to False.
axis (int, optional) – Axis on which to perform the filtering, defaults to -1
- Returns
Data after filtering, with shape (…, number_of_timesteps)
- Return type
n-dimensional array