From 59bec1a73b2e0be1b65c51d4a8383a2353b13367 Mon Sep 17 00:00:00 2001 From: bjhardcastle Date: Sat, 2 Nov 2024 09:49:56 -0700 Subject: [PATCH] Fix getting sync data --- src/npc_mvr/mvr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/npc_mvr/mvr.py b/src/npc_mvr/mvr.py index 415d4b3..9920aa1 100644 --- a/src/npc_mvr/mvr.py +++ b/src/npc_mvr/mvr.py @@ -89,9 +89,11 @@ def __init__( self._sync_data = npc_sync.get_sync_data(sync_path) else: try: - npc_sync.get_single_sync_path(self.sync_dir) + sync_path = npc_sync.get_single_sync_path(self.sync_dir) except (ValueError, FileNotFoundError): self._sync_data = None + else: + self._sync_data = npc_sync.get_sync_data(sync_path) self._video_name_filter = video_name_filter or "" self.task_data_or_path = task_data_or_path # for behavior box sessions @@ -1181,9 +1183,6 @@ def validate_stim_frame_times_for_behavior_session( return np.subtract(predictedVisOnsetFrames, visOnsetFrames) if __name__ == "__main__": - d = MVRDataset("s3://aind-ephys-data/ecephys_670248_2023-08-03_12-04-15") - d.validate() - from npc_mvr import testmod testmod()