current algorithm works reasonably well for anesthetized ecg data...and very poorly for ecgenie.
ecgenie data has large voltage shifts due to movement (which precludes easy automatic threshold setting for peak detection) and may also have inverted R peaks (which similarly creates problems for R peak detection)
suggested algorithm improvements
flag regions of recording of poor quality for exclusion
how do you define poor quality regions (baseline drift? high frequency noise? other?)
use peak detection based on slope (and/or using an absolute value transform) rather than simple voltage value
explore other filtering approaches (Hilbert?)
explore other "off the shelf" beat detection tools (neurokit?)
current algorithm works reasonably well for anesthetized ecg data...and very poorly for ecgenie.
ecgenie data has large voltage shifts due to movement (which precludes easy automatic threshold setting for peak detection) and may also have inverted R peaks (which similarly creates problems for R peak detection)
suggested algorithm improvements