From 2708ebe75d3ec37e832e71bad21d2ca940ea3bd1 Mon Sep 17 00:00:00 2001 From: felixp8 Date: Thu, 28 Sep 2023 18:03:34 +0000 Subject: [PATCH] revert start time nan behavior --- src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py b/src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py index b908172..fe13f50 100644 --- a/src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py +++ b/src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py @@ -63,11 +63,8 @@ def _read_file(self, file_path: FolderPathType): # get trial start time start_time = data_dict["task/trials.start_times.json"][i] if np.isnan(start_time): - if i == 0: - warnings.warn("Start time for first trial is NaN. Dropping this trial.", stacklevel=2) - continue - else: - raise ValueError(f"Start time for trial {i} is NaN.") + warnings.warn(f"Start time for trial {i} is NaN. Dropping this trial.", stacklevel=2) + continue # map response object index to id response_object = data_dict["behavior/trials.response.object.json"][i]