Skip to content

API

The API pages document Python signatures and link to executable examples. For expected inputs and outputs, scientific interpretation, limitations, and references, use the Biosiglib method catalog.

ECG

Function Description
baselineremove Estimate and remove baseline wander from fiducial isoelectric samples.
pantompkins Detect ECG R waves and expose the processing signals.
sloperange Derive a respiration signal from ECG slopes.

PPG

Function Description
hjorth_artifacts Detect artifacts from windowed Hjorth descriptors.

HRV

Function Description
fdmetrics Calculate frequency-domain variability metrics.
fillgaps Reconstruct missing events in an ordered series.
ipfm Reconstruct instantaneous heart rate and optional TVIPFM modulation.
osp Separate respiration-related HRV modulation from its orthogonal residual.
removefp Remove false-positive events from an ordered series.
tdmetrics Calculate time-domain variability metrics.

Respiration

Function Description
tidalvolume Estimate respiratory amplitude per cycle and its peak and valley envelopes.

Tools

Function Description
lpdfilter Apply the low-pass differentiator used by detection algorithms.
medfilt_threshold Compute a median-filtered adaptive threshold.
nanfilter Filter data while preserving NaN gaps.
nanfiltfilt Apply zero-phase filtering while preserving NaN gaps.
snaptopeak Refine event positions by snapping them to nearby peaks.
trimnans Trim boundary NaNs while preserving internal gaps.
expandnans Expand original NaN gaps by a time radius.
findsequences Locate repeated values with zero-based inclusive run boundaries.
slicesignal Slice signals into overlapping windows.
localmax Find the highest local peak along a signal axis.
hjorth Compute mean-square activity, mobility, and frequency spread.
nanpwelch Estimate PSD from valid stretches without crossing gaps.
peakedness Measure spectral peakedness.
ispeaky Classify spectral peakedness.