aECG (Python parser for annotated ECG HL7 files)
Python library to parse and visualize aECG files.
Demo
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
summaryto 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")
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aecg-0.1.3-py3-none-any.whl
(9.2 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41c122a0a173493a2149e1053df48850029e494e7792e3e51c2e0774df0fab1f
|
|
| MD5 |
609f93cee1d02a74cbea504c1e83302c
|
|
| BLAKE2b-256 |
a0964da5e10bd78d29b0f853416fcd5fa182b536076fcd764c1e9d4a6b0fc773
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28f4168f1aa698d0240f6953f1bf01d7c87a9d6d011387ee80783a4e3d17d771
|
|
| MD5 |
ebde799324296e8d8567e0cd6875f3fd
|
|
| BLAKE2b-256 |
78d6716977bc6c85c0393973ad9967493d48ee5a5956a3649666ffaa9da58dc3
|