physioex.data.FFTResample#
- class physioex.data.FFTResample(target_fs)[source]#
Bases:
PreprocessingStepFFT-based resample (
scipy.signal.resample) to a target rate.Distinct from
Resample: the output length is computed withint(len(x) * target_fs / fs)(truncating, no rounding), which is what the SleepPPG-Net reference code uses.Parameters#
- target_fsfloat
Target sampling rate in Hz.
Methods
__init__(target_fs)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:
- Parameters:
target_fs (float)