Functions#

Correction#

correct_extra_rr(rr, extra_idx[, artefacts])

Correct extra heartbeat(s) by removing the RR interval(s).

correct_missed_rr(rr, missed_idx[, artefacts])

Correct missed heartbeat(s) by adding new RR intervals.

interpolate_rr(rr, idx)

Correct long or short beat(s) using linear interpolation.

correct_rr(rr[, extra_correction, ...])

Correct artefacts in RR time series using the method described in [R5f0966f8069a-1].

correct_peaks(peaks[, input_type, ...])

Correct long, short, extra, missed and ectopic beats in peaks vector.

correct_missed_peaks(peaks, idx)

Correct missed peaks in boolean peak vector.

correct_ectopic_peaks(peaks, idx[, signal])

Correct pseudo ectopic heartbeat in boolean peak vector.

Detection#

ppg_peaks(signal, sfreq[, new_sfreq, ...])

Systolic peak detection for PPG signals.

ecg_peaks(signal[, sfreq, new_sfreq, ...])

A simple wrapper for many popular R peaks detectors algorithms.

rsp_peaks(signal, sfreq[, new_sfreq, ...])

Identify peaks and/or onsets in respiratory signal.

rr_artefacts(rr[, c1, c2, alpha, input_type])

Artefacts detection from RR time series using the subspaces approach proposed by Lipponen & Tarvainen (2019).

interpolate_clipping(signal[, ...])

Interoplate clipping artefacts.

Heart Rate Variability#

nnX(rr[, t, input_type])

Number of difference in successive R-R interval > t ms.

pnnX(rr[, t, input_type])

Number of successive differences larger than a value (def = 50ms).

rmssd(rr[, input_type])

Root Mean Square of Successive Differences.

time_domain(rr[, input_type])

Extract all time domain parameters from R-R intervals.

psd(rr[, sfreq, method, input_type])

Extract the frequency domain features of heart rate variability.

frequency_domain(rr[, sfreq, method, ...])

Extract the frequency domain features of heart rate variability.

nonlinear_domain(rr[, input_type])

Extract the non-linear features of heart rate variability.

poincare(rr[, input_type])

Compute SD1 and SD2 from the Poincaré nonlinear method for heart rate variability.

recurrence(rr[, input_type])

Compute quantitative metrics from the recurrence plot for heart rate variability.

recurrence_matrix(rr[, m, tau])

Compute the recurrence matrix from an array of RR intervals [R3bbf2e959ea6-1].

all_domain(rr[, input_type])

Extract all the HRV indices implemented for the time domain, frequency domain and linear domain.

Plots#

plot_circular(data[, y, hue, labels, units, ...])

Plot polar histogram.

plot_ectopic()

Visualization of ectopic beats detection.

plot_events([triggers, triggers_idx, ...])

Visualize the occurence of events along the physiological recording.

plot_evoked([epochs, signal, triggers, ...])

Plot evoked heart rate across trials.

plot_frequency(rr[, input_type, fbands, ...])

Plot power spectral densty of RR time series.

plot_poincare(rr[, input_type, figsize, ...])

Poincare plot.

plot_raw(signal[, peaks, sfreq, modality, ...])

Visualization of PPG or ECG signal with systolic peaks or R wave detection.

plot_rr(rr[, unit, kind, line, points, ...])

Plot instantaneous heart rate time series.

plot_shortlong()

Visualization of short, long, extra and missed intervals detection.

plot_subspaces([rr, artefacts, input_type, ...])

Visualization of short, long, extra, missed and ectopic beats detection.

Recording#

Oximeter(serial[, sfreq, add_channels, ...])

Recording PPG signal with Nonin pulse oximeter.

BrainVisionExG(ip, sfreq[, port])

Recording ECG signal through TCPIP.

Reports#

time_table([rr, time_df, input_type, ...])

Format time domain results for nice rendering.

frequency_table([rr, frequency_df, ...])

Format frequency domain results for nice rendering.

nonlinear_table([rr, nonlinear_df, ...])

Format nonlinear domain results for nice rendering.

Interactive data labelling and peaks correction#

Viewer([bids_folder, preprocessed_folder, ...])

This class handles the interaction with BIDS structured folders.

Editor(signal, sfreq, signal_type[, ...])

This class handle the visualization and manual edition of peaks vectors associated with physiological signals.

Utils#

norm_triggers(triggers[, threshold, n, ...])

Ceaning noisy triggers into boolean vecor with a unique spike for each event.

time_shift(x, events[, order])

Return the delay between x and events.

heart_rate(x[, sfreq, unit, kind, input_type])

Transform peaks data or RR intervals into continuous heart rate time series.

to_angles(x, events)

Angular values of events according to x cycle peaks.

to_epochs(signal[, triggers, triggers_idx, ...])

Epoch signal based on event triggers.

simulate_rr([n_rr, extra_idx, missed_idx, ...])

RR time series simulation with artefacts.

to_neighbour(signal, peaks[, kind, size])

Replace peaks with max/min neighbour in a given window.

input_conversion(x, input_type, output_type)

Convert input time series to the desired output format.

nan_cleaning(signal[, verbose])

Interpolate NaNs values.

find_clipping(signal)

Automatically find the max and/or min threshold value of clipping artefacts.

get_valid_segments(signal[, bad_segments])

Return the longest signal or intervals time series after dropping segments marked as bads.

norm_bad_segments(bad_segments)

Normalize bad segments.