Access annotation files.
Annotation(record, name='atr', stat=STAT_READ)
record - path to record
name - name of annotation file (extension)
stat - annotation access mode
STAT_READ - read annotation in MIT-BIH format
STAT_READ_AHA - read annotation in AHA format
fields:
record - record name
basedir - directory with record file
Methods for class Annotation
Annotation.read()
read(start=0, length=0, anntype=0, annotator=0) -> list [AnnotationEntry] start - starting index length - samples count, if 0 - read all annotations anntype - filter annotations by type (see EcgCodes) Returns list of AnnotationEntry objects.
Represents annotation event
AnnotationEntry(int time, int type, int subtype=0, int channel=0, int annotator=0, string aux="")
time - annotation time, in sample intervals from the beginning of the record
type - annotation type (see EcgCodes)
subtype - annotation subtype
channel - channel number
annotator - annotator number
aux - auxiliary information
fields:
time - annotation time, in sample intervals from the beginning of the record
type - annotation type
subtype - annotation subtype
channel - channel number
annotator - annotator number
aux - auxiliary information
isqrs - if annotation is of qrs type
typestr - string representation of annotation type
description - description of annotation type
Access MIT-BIH database records.
Record(string record)
record - path to record (without extension. i.e. c:/physiobank/100)
fields:
record - record name
nsig - number of signals in record
frequency - sampling frequency
signal_names - signals names
name - alias for record
Methods for class Record
Record.annotation()
annotation(name='atr', stat=STAT_READ) -> Annotation name - annotation name (file extension) Returns Annotation object for record.
Record.close()
Close record files.
Record.read()
read(signal_id, start=0, length=0, correct_gain=True) -> list signal_id - signal number or signal name in record start - index in sample intervals from the beginning of the record length - sample count, if 0 - read all annotations correct_gain - return values in real physical units instead of sampled data file values
Record.signal_info()
signal_info(signal_id) -> dict signal_id - signal number or signal name in record Returns dictionary with information about specified signal.
verbose()
Set wfdblib to verbose mode (prints some extra info on error). Debug only.