Skip to content

Commit 7058de1

Browse files
authored
update log_data to actually use the specified max duration per file
1 parent 8d821a0 commit 7058de1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/splendaq/daq/_log_data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,13 @@ def log_data(self, duration, savepath='./', comments='',
454454
nfiles = np.int32(np.ceil(duration / self._max_dur_per_file))
455455

456456
for ii in range(nfiles):
457+
if (ii + 1) * self._max_dur_per_file > duration:
458+
this_file_duration = duration % self._max_dur_per_file
459+
else:
460+
this_file_duration = self._max_dur_per_file
461+
457462
logfile = self.DL.start_logging(
458-
duration=duration,
463+
duration=this_file_duration,
459464
comments=comments,
460465
file_name_prefix=file_name_prefix,
461466
)

0 commit comments

Comments
 (0)