Skip to content

Commit

Permalink
Merge pull request #10 from splendor-collab/bug/use_max_duration_param
Browse files Browse the repository at this point in the history
Update log_data to actually use the specified max duration per file
  • Loading branch information
slwatkins authored Jun 9, 2023
2 parents 8d821a0 + 7058de1 commit 41b1ce6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/splendaq/daq/_log_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,13 @@ def log_data(self, duration, savepath='./', comments='',
nfiles = np.int32(np.ceil(duration / self._max_dur_per_file))

for ii in range(nfiles):
if (ii + 1) * self._max_dur_per_file > duration:
this_file_duration = duration % self._max_dur_per_file
else:
this_file_duration = self._max_dur_per_file

logfile = self.DL.start_logging(
duration=duration,
duration=this_file_duration,
comments=comments,
file_name_prefix=file_name_prefix,
)
Expand Down

0 comments on commit 41b1ce6

Please sign in to comment.