Skip to main content
ECGProcess icon

An ECG processing module

version: 1.3.1

This repository hosts a collection of functions for processing electrocardiogram (ECG) data and preparing it for analysis.

At a glance, ECGProcess is driven by three units:

  • A processor unit, reads individual ECG files and based on a user-supplied configuration file extracts waveform signals, median beats, and metadata to python dictionaries; see Configuration files).
  • The table unit, ECGTable, loops over a directory of ECG files, calls the reader for each one, while applying optional engineering steps (e.g. resampling, calibration, lead correction), and again optionally concatenating multiple files together.
  • A writer unit, tells ECGTable what to write to disk (tables, NumPy arrays, WFDB records, images, ...).

Together these units implement an application programming interface (API), mapping ECG data from distinct file types to class attributes providing a fixed interface for downstream processing. The package ships with boilerplate classes and validation utilities, letting the user expand processing of additional file types, build custom engineering (e.g. standardisation) pipelines, as well as create custom writers.

Please consult the documentation for the full picture.

Installation

The package is available on PyPI, and conda, with the latest source code available on gitlab.

Installation using PyPI

To install the package from PyPI, run:

pip install ecgprocess

This installs the latest stable release along with its dependencies.

Installation using conda

A Conda package is maintained in my personal Conda channel. To install from this channel, run:

conda install afschmidt::ecgprocess

Installation using gitlab

If you require the latest updates, potentially not yet formally released, you can install the package directly from GitLab.

First, clone the repository and move into its root directory:

git clone git@gitlab.com:SchmidtAF/ecgprocess.git
cd ecgprocess

Install the dependencies:

# From the root of the repository
conda env create --file ./resources/conda/envs/conda_create.yaml

To add to an existing environment use:

# From the root of the repository
conda env update --file ./resources/conda/envs/conda_update.yaml

Next the package can be installed:

make install

Development

For development work, install the package in editable mode, with its development dependencies (pytest, codespell, sphinx, ...) and Git commit hooks configured:

make install-dev

This command installs the package in editable mode with the [dev] extras and configures Git commit hooks, allowing you to run git pull to update the repository or switch branches without reinstalling.

Alternatively, you can install manually. This is exactly equivalent to make install-dev:

python -m pip install -e ".[dev]"
python .githooks/.setup_git_hooks.py

Git Hooks Configuration

When setting up a development environment, the setup-hooks command configures Git hooks to enforce conventional commit message formatting and spell check using codespell.

To view the commit message format requirements, run:

./.githooks/commit-msg -help

For frequent use, add this function to your shell configuration (~/.bashrc or ~/.zshrc):

commit-format-help() {
    local git_root
    git_root=$(git rev-parse --show-toplevel 2>/dev/null)
    
    if [ -z "$git_root" ]; then
        echo "Error: Not inside a git repository"
        return 1
    fi
    
    local hook_path="$git_root/.githooks/commit-msg"
    
    if [ ! -f "$hook_path" ]; then
        echo "Error: commit-msg hook not found"
        return 1
    fi
    
    "$hook_path" --help
}

Next steps...

If you installed with make install-dev, you might wish to run pytest to confirm everything is in working order.

# From the root of the repository
pytest tests

Usage

Please have a look at the example recipes.

Icon

The package icon features the Etruscan shrew, one of the smallest mammals, whose heart can beat over 1,500 times a minute, the fastest heart rate of any mammal.

Metadata

Release files for ECGProcess 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ECGProcess 1.3.1
File Size Uploaded Provenance Actions
ecgprocess-1.3.1.tar.gz 347.7 kB With provenance Details for ecgprocess-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ECGProcess 1.3.1
File Interpreter ABI Platform Actions
ecgprocess-1.3.1-py3-none-any.whl Python 3 none any Details for ecgprocess-1.3.1-py3-none-any.whl

Total release size: 720.7 kB

Release files / ecgprocess-1.3.1.tar.gz

Download URL ecgprocess-1.3.1.tar.gz
Size 347.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dc3e89331005b8cd79559c711d51564a26d594dcb23779d50ae60bfbfe3c2236
BLAKE2b-256 checksum
How to use checksums
3aead014c0f60dd09c12c77fd66acddc2e168fff5fe6d09df53bc7c373648410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / ecgprocess-1.3.1-py3-none-any.whl

Download URL ecgprocess-1.3.1-py3-none-any.whl
Size 373.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb68e80f7e748c7e9f200beaba49d15aa02b3af8b0ee341d06ba85ca57dd7f28
BLAKE2b-256 checksum
How to use checksums
0fd193c4be44463d39ada2c8787cc55770c97d3e37b58dfa26bafea41ee5fe22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Nov 4, 2026.

Transparency log

Security for ECGProcess 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ecgprocess-1.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page