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
Traceback (most recent call last):
File "test.py", line 10, in <module>
wfdb.wrann('A0001', 'atr', ann_idx, chan=ann_chan, label_store=ann_label_store,custom_labels=ann_custom_labels)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wfdb/io/annotation.py", line 1525, in wrann
annotation.wrann(write_fs=True, write_dir=write_dir)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wfdb/io/annotation.py", line 292, in wrann
self.wr_ann_file(write_fs=write_fs, write_dir=write_dir)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wfdb/io/annotation.py", line 798, in wr_ann_file
core_bytes = self.calc_core_bytes()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wfdb/io/annotation.py", line 937, in calc_core_bytes
data_bytes.append(field2bytes('samptype', [sampdiff[i], self.symbol[i]]))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wfdb/io/annotation.py", line 1369, in field2bytes
typecode = ann_label_table.loc[ann_label_table['symbol']==value[1], 'label_store'].values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
I think probably I used the incorrect way to write the custom labels.
Could you guide me on how to correctly use wfdb.wrann with custom_labels and label_store to write the annotation?
Thanks.
The text was updated successfully, but these errors were encountered:
nanli-emory
changed the title
How to use wfdb.wrann with custom_labels and label_store?
How to use wfdb.wrann with custom_labels and label_store to write the custom labels?
Jun 27, 2022
I was trying to write an annotation as wfdb format annotation.
However, there is a error.
I think probably I used the incorrect way to write the custom labels.
Could you guide me on how to correctly use wfdb.wrann with custom_labels and label_store to write the annotation?
Thanks.
The text was updated successfully, but these errors were encountered: