physioex.data.FixedLength#
- class physioex.data.FixedLength(seconds, fill=0.0)[source]#
Bases:
PreprocessingStepPad the END with
fillor truncate the END to a fixed length.len(y) == round(seconds * fs_in). The output length depends on the input sampling rate only, so the sampling rate is unchanged.Parameters#
- secondsfloat
Target signal length in seconds (e.g. 36000 = 10 h).
- fillfloat
Value used when padding (default 0.0).
Methods
__init__(seconds[, fill])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: