Skip to content

Commit f61d3a1

Browse files
author
Benjamin Moody
committed
Record.wr_dat_files: handle multiple files in expanded format.
When writing multiple signal files in expanded format, the samps_per_frame passed to wr_dat_file must be the list of samples-per-frame *for that particular dat file* (corresponding to the e_d_signal argument), not the samples-per-frame of the whole record.
1 parent d1d26ba commit f61d3a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wfdb/io/_signal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ def wr_dat_files(self, expanded=False, write_dir=""):
950950
dat_offsets[fn],
951951
True,
952952
[self.e_d_signal[ch] for ch in dat_channels[fn]],
953-
self.samps_per_frame,
953+
[self.samps_per_frame[ch] for ch in dat_channels[fn]],
954954
write_dir=write_dir,
955955
)
956956
else:

0 commit comments

Comments
 (0)