physioex.data.ChebyshevLowpass#

class physioex.data.ChebyshevLowpass(cutoff_hz=8.0, order=8, stop_db=40.0)[source]#

Bases: PreprocessingStep

Type-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 to cutoff_hz and at most -stop_db dB below cutoff_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_hz is 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).

__init__(cutoff_hz=8.0, order=8, stop_db=40.0)[source]#
Parameters:

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.

header is an optional per-channel metadata dict (physical dimension, physical min/max, …) forwarded to steps that declare they need it (needs_header attribute, e.g. PhysicalScale). Steps that ignore it simply do not read it; the signature default keeps every existing compile(fs) call site working.

Parameters:
Return type:

CompiledStep

spec()[source]#

Return canonical, hashable text repr.

Format: ClassName(key1=val1,key2=val2,…) with sorted keys, floats normalized via f’{float(v):.10g}’.

Return type:

str

Parameters: