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.3.tar.gz (10.2 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.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aecg-0.1.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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.3.tar.gz
Algorithm Hash digest
SHA256 41c122a0a173493a2149e1053df48850029e494e7792e3e51c2e0774df0fab1f
MD5 609f93cee1d02a74cbea504c1e83302c
BLAKE2b-256 a0964da5e10bd78d29b0f853416fcd5fa182b536076fcd764c1e9d4a6b0fc773

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aecg-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28f4168f1aa698d0240f6953f1bf01d7c87a9d6d011387ee80783a4e3d17d771
MD5 ebde799324296e8d8567e0cd6875f3fd
BLAKE2b-256 78d6716977bc6c85c0393973ad9967493d48ee5a5956a3649666ffaa9da58dc3

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