Skip to content

Commit

Permalink
Fix truncated MVR files
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Oct 10, 2024
1 parent 524d124 commit 3486856
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/np_workflows/shared/base_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,12 @@ def stop_recording_after_stim_finished(self,
stims = self.stims
while not all(_.is_ready_to_start() for _ in stims):
time.sleep(5)
is_first_mvr_file = True
for stoppable in (_ for _ in recorders if isinstance(_, Stoppable)):
if is_first_mvr_file and 'mvr' in stoppable.__name__.lower():
stoppable.stop()
if 'videomvr' in stoppable.__name__.lower():
sleep_s = 4
time.sleep(sleep_s)
logger.warning(f'Waiting additional {sleep_s} s for MVR to finish writing...')
is_first_mvr_file = False
stoppable.stop()

def start_services(self, *services: Service) -> None:
if not services:
Expand Down

0 comments on commit 3486856

Please sign in to comment.