function
clean
PythonClean ECG signal by applying biquad filter.
clean( data: npt.NDArray, lowcut: float = 0.5, highcut: float = 30, sample_rate: float = 1000, order: int = 3, axis: int = -1, forward_backward: bool = True,) -> npt.NDArrayClean ECG signal by applying biquad filter.
By default, a 3rd order Butterworth bandpass filter from 0.5 to 30 Hz is applied.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | npt.NDArray | Required | ECG signal. |
lowcut | float | 0.5 | Lower cutoff in Hz. Defaults to 0.5 Hz. |
highcut | float | 30 | Upper cutoff in Hz. Defaults to 30 Hz. |
sample_rate | float | 1000 | Sampling rate in Hz. Defaults to 1000 Hz. |
order | int | 3 | Filter order. Defaults to 3 (3rd order Butterworth filter). |
axis | int | -1 | Axis to apply against. Defaults to -1. |
forward_backward | bool | True | Apply filter forward and backward. Defaults to True. |
Returns
| Type | Description |
|---|---|
npt.NDArray | npt.NDArray: Cleaned ECG signal. |