The ATC format is AliveCor's standard for ECG recordings. ATCpy provides utilities for reading and writing ATC files in Python.
ATCpy implements the Alive File Format Specification 1.6.
Python 3
Bazel
Reads and parses an ATC file.
import atc_reader
from atc_reader import ATCReader
reader = ATCReader('path_to_file.atc')
if reader.status() == atc_reader.READ_SUCCESS:
leadI = atc_reader.get_ecg_samples(1)
# ...
else:
# handle error.
Writes ECG data to an ATC file.
from atc_writer import ATCWriter
with ATCWriter('path_to_file.atc') as writer:
writer.write_header(...)
writer.write_ecg_samples(...)
...