Photoplethysmogram (PPG)¶
Photoplethysmogram (PPG) signals are optical measurements of peripheral blood volume changes and are widely used in wearable health monitoring. PPG supports pulse detection, heart rate estimation, and variability analysis with low-cost sensor setups.
API quick links: biosppy.signals.ppg | biosppy.signals.ppg.ppg()
Quick Usage with biosppy.signals.ppg.ppg()¶
import numpy as np
from biosppy.signals import ppg
signal = np.loadtxt("examples/ppg.txt")
out = ppg.ppg(signal=signal, sampling_rate=1000.0, show=False)
print(out.keys())
Inputs
signal: raw PPG samples.sampling_rate: acquisition frequency in Hz.units/show: optional units label and plotting control.
Outputs
A
ReturnTuplewith processed PPG outputs, usually including filtered signal, pulse onsets/peaks, and heart-rate related descriptors.Use
out.keys()to inspect returned values.
Example of PPG summary plot: