You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use wfdb-python generate a set of annotation files that describe heart rate measurements. I am trying to test a heart rate algorithm to the EC57 standard and would like to be able to use the measurement-by-measurement (mxm) function required by the standard: https://physionet.org/physiotools/wag/mxm-1.htm. According to the linked documentation, the annotation files need to be saved with anntyp = MEASURE in order to use the mxm function. Therefore I am trying to set the anntype to the string 'MEASURE' using the wfdb wrann API as follows:
wfdb.wrann(record, 'hr', annotation_time, symbol=['MEASURE' for _ in annotation_time], subtype=None, chan=None, num=None, aux_note=heart_rates, label_store=None, fs=None, custom_labels=None, write_dir='')
However, this leads to the error
ValueError: Subelements of the symbol field must be strings of length 1 to 3
because the string 'MEASURE' is longer than a typical single character anntyp. Is there another way to save annotation files with a longer anntyp? If not, would it be possible to remove this symbol field check in order to allow folks to test to the EC57 standard using this package?
Secondly, I know the mxm function hasn't been implemented yet (see #222) for this package so I can prioritize it for the next things to work on. Hope this helps!
Activity
Lucas-Mc commentedon Jul 23, 2020
Hey @maidens, it appears like the symbol is
=instead ofMEASUREfor this version so try that first:wfdb-python/wfdb/io/annotation.py
Line 57 in 0faf29f
Secondly, I know the
mxmfunction hasn't been implemented yet (see #222) for this package so I can prioritize it for the next things to work on. Hope this helps!maidens commentedon Jul 23, 2020
Awesome, thanks! This has been helpful. I didn't realize that the "=" token was equivalent. I will try that out.