Software Open Access

Python Online and Offline ECG QRS Detector based on the Pan-Tomkins algorithm

Michał Sznajder; Marta Łukowska

The modules published in this repository are Python implementations of online and offline QRS complex detectors in ECG signal, based on the Pan-Tomkins algorithm (Pan J., Tompkins W. J., A real-time QRS detection algorithm, IEEE Transactions on Biomedical Engineering, Vol. BME-32, No. 3, March 1985, pp. 230-236).

The QRS complex corresponds to the depolarization of the right and left ventricles of the human heart. It is the most visually obvious part of the ECG signal. QRS complex detection is essential for time-domain ECG signal analyses, namely heart rate variability. It makes it possible to compute inter-beat interval (RR interval) values that correspond to the time between two consecutive R peaks. Thus, a QRS complex detector is an ECG-based heart contraction detector.

This repository contains two versions of the Pan-Tomkins QRS detection algorithm implementation:
* QRSDetectorOnline - Online version detects QRS complexes in a real-time acquired ECG signal. Therefore, it requires an ECG device to be plugged in and receiving a signal in real-time.
* QRSDetectorOffline - Offline version detects QRS complexes in a pre-recorded ECG signal dataset (e.g. stored in .csv format).

Files (977.1 kB)
Name Size
977.1 kB Download
All versions This version
Views 6,9736,144
Downloads 975884
Data volume 952.2 MB863.8 MB
Unique views 6,4965,789
Unique downloads 948861


Cite as