Welcome to BioSPPy¶
BioSPPy is a toolbox for biosignal processing written in Python.
The toolbox bundles together signal processing, visualization, feature
extraction, quality assessment, synthesis, and pattern recognition methods
geared towards the analysis of physiological signals.
Whether you are exploring a single ECG recording, prototyping a signal quality
pipeline, extracting domain-specific features, or benchmarking biosignal
algorithms, BioSPPy provides both ready-to-use high-level workflows and the
lower-level building blocks behind them.
Highlights:
Turnkey signal-processing pipelines for common biosignals
Signal analysis primitives such as filtering, smoothing, spectral analysis, segmentation, and heart-rate estimation
Feature extraction in time, frequency, cepstral, time-frequency, and non-linear / phase-space domains
Signal quality assessment utilities
Synthetic signal generators for simulation and testing
Interactive and publication-style plotting utilities
Clustering and biometrics tools for downstream analysis
Supported biosignals¶
BioSPPy includes support for a broad range of physiological signals,
including:
ACC (Accelerometry)
ABP (Arterial Blood Pressure)
BVP (Blood Volume Pulse)
ECG (Electrocardiography)
EDA (Electrodermal Activity)
EEG (Electroencephalography)
EGM (Electrogram)
EMG (Electromyography)
PCG (Phonocardiography)
PPG (Photoplethysmography)
Respiration
RRI / HRV (RR intervals and heart-rate variability analysis)
For signal-specific overviews and examples, see Biosignals.
Main modules at a glance¶
Getting Started for the package overview and first ECG walkthrough
Biosignals for biosignal-specific pages and examples
Machine Learning for optional machine-learning models and usage examples
API Reference for the complete API reference
ReturnTuple Object for the named return container used across the package
biosppy.features for feature extraction modules
biosppy.synthesizers for synthetic biosignal generation
Contents:
Installation¶
Installation can be easily done with pip:
$ pip install biosppy
Quick ECG example¶
The code below loads an ECG signal from the examples folder, processes it,
detects R-peaks, and computes the instantaneous heart rate.
from biosppy import storage
from biosppy.signals import ecg
# load raw ECG signal
signal, metadata = storage.load_txt('./examples/ecg.txt')
# process it and plot
out = ecg.ecg(signal=signal, sampling_rate=metadata['sampling_rate'], show=True)
This high-level pipeline returns a biosppy.utils.ReturnTuple
containing named outputs such as the filtered signal, detected R-peaks,
heartbeat templates, and instantaneous heart rate.