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.2.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.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aecg-0.1.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aecg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3988f4bfed593a592a8671ec8e99d7e538428af245a71d9f58e2272b953b6b67
MD5 ce0e27549bb5dc9ef48360fe519f1eba
BLAKE2b-256 bec427e6aa81899262dd8e28a089e7f56b44354fb5d3dcf3a3addfaf504377a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aecg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aecg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e734fc0a62cd93638121fdfd9f1b188d08316fcbd28333435c9d08aa888119
MD5 f9deb3957ca41a8d962af70cef928562
BLAKE2b-256 f474139c1acbded1567f79a16d39478f60c158b5b5366c0a3542536b80bac4d4

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