physioex.data.ChebyshevLowpass#
- class physioex.data.ChebyshevLowpass(cutoff_hz=8.0, order=8, stop_db=40.0)[source]#
Bases:
PreprocessingStepType-II Chebyshev IIR lowpass (zero-phase via
sosfiltfilt).Type-II (
cheby2) attenuation is specified in the stop band rather than ripple in the pass band: gain is flat (within numerical error) up tocutoff_hzand at most-stop_dbdB belowcutoff_hz * (1 + transition). This is the filter used by the SleepPPG-Net / SPPPPG-Net reference code (8th order, 8 Hz, -40 dB).Uses second-order sections (SOS) for numerical stability on long signals at high sampling rates (see
BandpassFilter).If
cutoff_hzis not below Nyquist the step is skipped with a warning (the signal is passed through unchanged).Parameters#
- cutoff_hzfloat
Lowpass cutoff in Hz (default 8.0).
- orderint
Filter order (default 8).
- stop_dbfloat
Minimum attenuation (dB) in the stop band (default 40.0).
Methods
__init__([cutoff_hz, order, stop_db])compile(fs_in[, header])Precompute any expensive state and return a callable specialized for fs_in.
spec()Return canonical, hashable text repr.
- compile(fs_in, header=None)[source]#
Precompute any expensive state and return a callable specialized for fs_in.
headeris an optional per-channel metadata dict (physical dimension, physical min/max, …) forwarded to steps that declare they need it (needs_headerattribute, e.g.PhysicalScale). Steps that ignore it simply do not read it; the signature default keeps every existingcompile(fs)call site working.- Parameters:
- Return type: