Skip to main content

Python parser and viewer for Annotated ECG HL7 files

Project description

aECG (Python parser for annotated ECG HL7 files)

Python library to parse and visualize aECG files.

Demo

Open in Streamlit

Installation

pip install aecg

Usage

  • Read your aECG xml file.
import aecg

file_path = r"tests/data/Example aECG.xml"
aecg_o = aecg.read(file_path)
  • Use summary to get an overview of the data.
aecg_o.summary()
{
    'id': UUID('61d1a24f-b47e-41aa-ae95-f8ac302f4eeb'),
    'date': datetime.datetime(2002, 11, 22, 9, 10),
    'series_count': 1,
    'annotations_count': 167,
}
  • Get waveforms dataframes and their associated plots.
titles = []
dfs = []
figs = []

for serie in aecg_o.series:
    for i, seq_set in enumerate(serie.sequence_sets, 1):
        title = f"Serie {serie.id} | Sequence set {i}"
        df = seq_set.get_sequences_df()
        fig = aecg.plotter.plot_seq_set(df, title=title)
        dfs.append(df)
        titles.append(title)
        figs.append(fig)

    for i, seq_set in enumerate(serie.derived_sequence_sets, 1):
        title = f"Serie {serie.id} | Derived sequence set {i}"
        df = seq_set.get_sequences_df()
        fig = aecg.plotter.plot_seq_set(df, title=title)
        dfs.append(df)
        titles.append(title)
        figs.append(fig)
dfs[0]
figs[0].show()
  • You can choose to plot all the curves together.
aecg.plotter.plot_seq_set(dfs[0], plot_mode="one")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aecg-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aecg-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file aecg-0.1.1.tar.gz.

File metadata

  • Download URL: aecg-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.20

File hashes

Hashes for aecg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 73d5e9d2f3203ac0791c10532a2ac31f974b94daa316e22790d3bcb544797e1f
MD5 6beeb59188d65073f8e2fa8973908789
BLAKE2b-256 1f83c703290934e0b81b24d63dabcb80ed7f6ea40d51e39897c8851a5de40734

See more details on using hashes here.

File details

Details for the file aecg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aecg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.20

File hashes

Hashes for aecg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11eb705ed458c3d7d3cd6d4c676518bb8e2be1405e175f60ce66512724fefbbf
MD5 e3c0b115bb68e17e9af74b4990124c62
BLAKE2b-256 380f67283788d9968310348d637121322d3fe35e0f8db89e5a0480ed08dd5fdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page