I am reading a mitdb 101 record and writing back with a different name without making changes to annotation, this code is throwing error. I am not able to understand why check on subtype is present while writing WFDB if subtyp == -1 is possible. Please let me know how to avoid this error.
Reproducible example below
import wfdb ann = wfdb.rdann('101', extension='atr') wfdb.wrann('101_temp','atr',ann.sample,ann.symbol,aux_note=ann.aux_note,write_dir='.',subtype=ann.subtype)
ValueError: The 'subtype' field must only contain non-negative integers up to 127'
I am reading a mitdb 101 record and writing back with a different name without making changes to annotation, this code is throwing error. I am not able to understand why check on subtype is present while writing WFDB if subtyp == -1 is possible. Please let me know how to avoid this error.
Reproducible example below
import wfdb ann = wfdb.rdann('101', extension='atr') wfdb.wrann('101_temp','atr',ann.sample,ann.symbol,aux_note=ann.aux_note,write_dir='.',subtype=ann.subtype)
ValueError: The 'subtype' field must only contain non-negative integers up to 127'
(WFDB Version: 3.3.0, Python 3.8.8)