Filters¶
All filters use SOS (second-order sections) + zero-phase sosfiltfilt to preserve ECG morphology.
Apply a Butterworth low-pass filter |
|
Apply a Butterworth high-pass filter |
|
Apply a Butterworth band-pass filter |
|
Apply an IIR notch (band-stop) filter |
|
Remove baseline wander using a high-pass filter |
|
Apply AHA diagnostic-grade filtering: 0.05–150 Hz bandpass + notch |
|
Apply monitoring-grade filtering: 0.67–40 Hz bandpass + notch |
- ecgdatakit.processing.lowpass(lead, cutoff, order=4, *, fs=None)[source]¶
Apply a Butterworth low-pass filter.
- ecgdatakit.processing.highpass(lead, cutoff, order=4, *, fs=None)[source]¶
Apply a Butterworth high-pass filter.
- ecgdatakit.processing.bandpass(lead, low, high, order=4, *, fs=None)[source]¶
Apply a Butterworth band-pass filter.
- Parameters:
- Return type:
- ecgdatakit.processing.notch(lead, freq=50.0, quality=30.0, *, fs=None)[source]¶
Apply an IIR notch (band-stop) filter.
- Parameters:
lead (
Lead|ndarray[tuple[Any,...],dtype[double]]) – Input ECG lead or raw signal array.freq (
float) – Center frequency to remove (default 50 Hz for mains hum).quality (
float) – Quality factor — higher means narrower notch (default 30).fs (
int|None) – Sample rate in Hz. Required when lead is a numpy array.
- Return type:
- ecgdatakit.processing.remove_baseline(lead, cutoff=0.5, order=2, *, fs=None)[source]¶
Remove baseline wander using a high-pass filter.
- ecgdatakit.processing.diagnostic_filter(lead, notch_freq=50.0, *, fs=None)[source]¶
Apply AHA diagnostic-grade filtering: 0.05–150 Hz bandpass + notch.
Suitable for diagnostic ECG interpretation where full morphology (including ST segment) must be preserved.