heartcv.stats
- heartcv.stats(peaks, sample_length, fs, windows=1)[source]
Calculate cardiac statistics for the peaks detected.
- Parameters
peaks (ndarray) – Detected peaks.
sample_length (int) – Length of time-series data.
fs (int or float) – Sampling frequency of footage.
windows (int) – Number of windows to subsample the signal and average the resultant statistics over.
- Returns
stats – Dictionary containing cardiac stats based on the data provided. The following keys can be accessed:
’bpm’: Beats per minute.
’min_b2b’: Minimum beat to beat interval.
’mean_b2b’: Mean beat to beat interval.
’median_b2b’: Median beat to beat interval.
’max_b2b’: Maximum beat to beat interval.
’sd_b2b’: Standard deviation in beat to beat interval.
’range_b2b’: Range in beat to beat intervals.
- ’rmssd’: Root mean square of successive differences in beat
to beat intervals.
- Return type
dict