Translating MATLAB ECG Signal Quality Algorithms into Python: Validation and Performance Analysis Using the MIT-BIH Noise Stress Test Database
Author(s)
Karnani, Divij
Advisor(s)
Editor(s)
Collections
Supplementary to:
Permanent Link
Abstract
Signal Quality Indices (SQIs) are essential for ensuring the reliability of electrocardiogram (ECG) data, especially in environments prone to noise and interference. While robust SQI algorithms exist, their accessibility is limited in resource-constrained and telemedicine settings. This thesis presents a comprehensive translation of the ECG SQI functionality from the PhysioNet Cardiovascular Signal Toolbox in MATLAB to Python, aiming to create an open-source, scalable, and low-cost alternative. The translated tool uses the Pan-Tompkins algorithm for R-peak detection and computes signal quality based on the F1 score across ECG leads using a rolling window method. Validation was conducted using the MIT-BIH Noise Stress Test Database, which includes ECG signals with controlled levels of synthetic noise. Results demonstrate a strong positive correlation between signal-to-noise ratio (SNR) and SQI scores, confirming that the Python tool reliably distinguishes between clean and noisy segments. Additional tests with mixed-quality leads further validate its robustness in real-world scenarios. The tool’s performance closely mirrors that of its MATLAB counterpart, indicating that accurate ECG signal quality assessment can be achieved using open-source technologies. This work supports broader adoption of Python-based tools in clinical research, remote monitoring, and real-time diagnostic systems.
Sponsor
Date
Extent
Resource Type
Text
Resource Subtype
Undergraduate Research Option Thesis