ecginterpret
Rule-based ECG interpretation statements (rhythm, conduction, hypertrophy,
ischemia, pediatric and Glasgow-style rule sets) computed from the
measurements produced by ecg-records.
The output is a separately versioned Interpretation document; it is not
part of the ECG Record measurement contract.
This software is research and engineering software. It is not a medical device and is not intended to diagnose, treat, cure, or prevent disease. Outputs require independent validation for the intended use and must not be used as a substitute for professional medical judgment.
Install
pip install ecginterpret # or: pip install "ecg-records[interpret]"
Use
import ecgfeat
from ecginterpret import analyze, render_report
signal = ecgfeat.read_signal("ptbxl/records500/00000/00001_hr.hea") # or ecgfeat.load_example("lbbb")
record, document = analyze(signal, profile="all") # one engine run: ECG Record + Interpretation document
print(render_report(document, record)) # text; format="markdown" or "html"
result = document.as_dict()
result["interpretation"]["heart_rate_class"] # e.g. "normal"
result["interpretation"]["bundle_branch_block"] # e.g. "LBBB", or None
[s["statement"] for s in result["clinical"]["final_statements"]]
analyze measures once and returns the same record as ecgfeat.ecg_record
and the same document as interpret_record (the generation timestamp aside),
in about half the time. From the command line:
ecg-interpret ptbxl/00001_hr.hea --format markdown --record rec.json
interpret_record(record, signal=signal) interprets a saved record; it needs
the raw signal because ECG Record schema 1.x does not
carry every measurement the rule engines read (representative-lead
morphology, rhythm and P-wave evidence), so the interpreter re-derives them
from the signal with the record's own resolved configuration after checking
the signal against the record's raw-signal SHA-256. interpret_features takes
the legacy measurement object from ecgfeat.compat.api_v0.ECGFeatureExtractor
directly (compatibility input, removed with ecgfeat.compat).
Versioning
The Interpretation document carries schema_version (currently 1.0.0),
independent of both the package version and the ECG Record schema version.
The JSON Schema ships at ecginterpret/schemas/interpretation/1.0/schema.json.
Supported input: ECG Record schema major 1 (1.0 and 1.1). Requires ecg-records[engine]>=0.3,<0.4 (installed automatically).
Metadata
Release files for ecginterpret 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ecginterpret-0.2.1.tar.gz | 183.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ecginterpret-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 395.3 kB
Release files / ecginterpret-0.2.1.tar.gz
| Download URL | ecginterpret-0.2.1.tar.gz |
|---|---|
| Size | 183.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
926ff4d8a01a1fe0e4f4ffe361b1351bf3cca902129ed0d376cab56e0669f2df
|
|
BLAKE2b-256 checksum How to use checksums |
281141b86a83828d1edd3b16e575fe6cb460b0f0012bdcedc683848009070715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / ecginterpret-0.2.1-py3-none-any.whl
| Download URL | ecginterpret-0.2.1-py3-none-any.whl |
|---|---|
| Size | 212.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a0ce21276dd44d06a66131a3649f17ea428d4d2f667dde8301333ec4e1b0ef9
|
|
BLAKE2b-256 checksum How to use checksums |
d62fff900d27bb94a14edb7cf94c4ec23f6dd77984e2127c16828e78a0350635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for ecginterpret 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.