Skip to contents

For each QRS index, searches [loc + 0.2 * fs, loc + 0.5 * fs] for the absolute maximum and records its global index.

Usage

morie_dsp_t_wave(ecg, qrs_locs, fs = 360)

Arguments

ecg

ECG vector.

qrs_locs

QRS indices (1-based) from a detector like morie_dsp_pan_tompkins.

fs

Sampling frequency (Hz). Default 360.

Value

Integer vector of T-peak indices.

References

Rangayyan & Krishnan (2015), Ch. 4, sec. 4.8.

Examples

set.seed(1)
beat <- c(rep(0, 130), 0.1, 0.4, 1.2, -0.3, rep(0, 40), 0.25, rep(0, 185))
ecg <- rep(beat, 5) + rnorm(1800, 0, 0.02)
qrs <- which(ecg > 1)[c(TRUE, diff(which(ecg > 1)) > 100)]
str(morie_dsp_t_wave(ecg, qrs_locs = qrs, fs = 360), max.level = 1)
#>  int [1:5] 274 615 948 1295 1737