Metadata-Version: 2.4
Name: ECGquant
Version: 0.1.0
Summary: Processing pipeline for ECG records and quantification of basic and advanced electrocardiographic markers, natively compatible with the PTB and PTBXL databases.
Author-email: Hector Martinez-Navarro <hector.martinez-navarro@uv.es>, Ignacio Garcia-Fernandez <ignacio.garcia@uv.es>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: wfdb
Dynamic: license-file

# ECGquant

A robust Python processing pipeline for Electrocardiogram (ECG) records, specifically tailored to handle and analyze data from the PTB and PTB-XL databases.

## Overview

ECGquant automates the extraction, processing, and visualization of key electrocardiographic features. Built on top of standard scientific libraries, it provides a reliable and clean interface for clinical data analysis, precise wave delineation, and biomarker quantification.

## Features

* Database Compatibility: Native support for loading and parsing PTB and PTB-XL database records via wfdb.
* Signal Processing: Advanced noise filtering and baseline wander removal utilizing scipy and numpy.
* Wave Delineation: Accurate detection and localization of P, Q, R, S, and T wave peaks, onsets, and offsets.
* Clinical Markers: Automated identification of critical cardiac markers, including the J-point and the ST segment (isoelectric line).
* Data Management: Export, manipulate, and analyze structured patient datasets seamlessly with pandas.
* Visualization: Built-in plotting tools via matplotlib to inspect clean signals and verify extracted fiducial points.

## Installation

You can install the package directly from PyPI:

pip install ECGquant

## Quick Start

Here is a basic example of how to load a record and process it using the ECGquant pipeline:

import ecgquant as eq
import wfdb

# 1. Load a standard record from the PTB-XL database
record = wfdb.rdrecord('path/to/your/ptbxl_record')

# 2. Initialize the processing pipeline
pipeline = eq.Pipeline(record)

# 3. Process the signal to extract waveforms and clinical markers
results = pipeline.process()

# 4. Visualize the delineated ECG (displaying QRS complex, J-point, and ST segment)
pipeline.plot_features()

## Requirements

The library requires Python >= 3.10 and depends on the following core packages:
* numpy
* scipy
* pandas
* matplotlib
* wfdb

## License

This project is licensed under the MIT License. See the LICENSE file for details.
