The wavedet function uses the matlab algorithm wavedet which was compiled for Windows OS for its usage in python.
The algorithm is described in the the work of Martinez et al. [1]. The function is calculating the fiducial points of the ECG time series using the wavelet transform.
Parameters:
matlab_pat – path to matlab runtime 2021a directory
peaks – Optional input- Annotation of the reference peak detector (Indices of the peaks), as an ndarray of shape (L,N), when L is the number of channels or leads and N is the number of peaks. If peaks are not provided they are calculated using the jqrs detector.
Returns:
fiducials: Nested dictionary of leads - For every lead there is a dictionary that includes indexes for each one of nine fiducials points.
The function is an Implementation of an energy based qrs detector [3]. The algorithm is an
adaptation of the popular Pan & Tompkins algorithm [2]. The function assumes
the input ecg is already pre-filtered i.e. bandpass filtered and that the
power-line interference was removed. Of note, NaN should be represented by the
value -32768 in the ecg (WFDB standard).
Parameters:
thr – threshold, default value is 0.8.
rp – refractory period (sec), default value is 0.25.
Returns:
indexes of the R-peaks in the ECG signal, as an ndarray of shape (L,N), when L is the number of channels or leads and N is the number of peaks.
class pecg.ecg.Biomarkers.Biomarkers(signal:numpy.array, fs:int, fiducials:dict)[source]¶
Bases: object
The purpose of the Biomarkers class is to calculate the biomarkers, we divided the morphological biomarkers into two main groups: intervals and waves.
Parameters:
signal – The ECG signal as a ndarray.
fs – The sampling frequency of the signal [Hz].
fiducials – Nested dictionary of leads - For every lead there is a dictionary that includes indexes for for each one of nine fiducials points. this nested dictionary can be calculated using the FiducialPoints module.