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.
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")
Demo
Coming...
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(9.9 kB
view details)
Built Distribution
aecg-0.1.0-py3-none-any.whl
(9.1 kB
view details)
File details
Details for the file aecg-0.1.0.tar.gz
.
File metadata
- Download URL: aecg-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052433eecdcf260a7b46a616c9dd69362737db53c3424f3eea7a358ba4e5f77a |
|
MD5 | cae700633a4d1827488b011b2c3154c6 |
|
BLAKE2b-256 | aeb39c5727003abc15b8b813744f601f8646407c11d3649ad82d41bdb10c3a13 |
File details
Details for the file aecg-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: aecg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a69e4ad947c14c8536505df2cdb77f2762017157b117d45cbf5fdbdb56f178a |
|
MD5 | ff4cfdc51823d49521fc8d3c6607fe4d |
|
BLAKE2b-256 | 723faf43c1251724529558b879004de2374b30fdbb3460996d2a603d102917a0 |