ECGDataKit¶
A Python library for parsing, processing, and visualizing multi-format ECG files.
A Python library for parsing, processing, and visualizing multi-format ECG files.
pip install ecgdatakit
Parse HL7 aECG, Philips Sierra, GE MUSE, SCP-ECG, DICOM, EDF, WFDB, MFER, and more into one unified data structure.
Butterworth filters, R-peak detection (Pan-Tompkins & Shannon energy), HRV analysis, FFT, signal quality, lead derivation, ECG cleaning, and DeepFADE neural-net denoising.
Standard 12-lead grids, R-peak annotations, HRV dashboards, spectrograms, and full ECG reports. Static or interactive.
from ecgdatakit import FileParser
from ecgdatakit.processing import diagnostic_filter, detect_r_peaks, heart_rate
from ecgdatakit.plotting import plot_12lead, plot_peaks
# Parse any ECG file (auto-detect format)
record = FileParser().parse("ecg_file.xml")
# Filter and detect R-peaks
lead = record.leads[1] # Lead II
filtered = diagnostic_filter(lead)
peaks = detect_r_peaks(filtered)
print(f"Heart rate: {heart_rate(filtered, peaks):.0f} bpm")
# Visualize
fig = plot_12lead(record)
fig.savefig("ecg_report.png", dpi=150)# From PyPI
pip install ecgdatakit
# From GitHub (package lives in lib/)
pip install "ecgdatakit @ git+https://github.com/UMMISCO/ECGDataKit.git#subdirectory=lib"
# With signal processing (scipy)
pip install "ecgdatakit[processing]"
# With plotting (matplotlib + plotly)
pip install "ecgdatakit[plotting,plotting-interactive]"
# ECG cleaning backends (BioSPPy + NeuroKit2)
pip install "ecgdatakit[cleaning]"
# DeepFADE neural-net denoising (requires torch)
pip install "ecgdatakit[denoising]"
# Everything (except torch — install separately)
pip install "ecgdatakit[all]"A Python library for parsing, processing, and visualizing multi-format ECG files.