diff --git a/wfdb/io/annotation.py b/wfdb/io/annotation.py index 19f7ae5a..d10512e3 100644 --- a/wfdb/io/annotation.py +++ b/wfdb/io/annotation.py @@ -280,6 +280,11 @@ def wrann(self, write_fs=False, write_dir=''): if 'label_store' not in present_label_fields: self.convert_label_attribute(source_field=present_label_fields[0], target_field='label_store') + + # Calculate the symbol field if necessary + if 'symbol' not in present_label_fields: + self.convert_label_attribute(source_field=present_label_fields[0], + target_field='symbol') # Write the header file using the specified fields self.wr_ann_file(write_fs=write_fs, write_dir=write_dir)