Skip to content

Commit

Permalink
revert start time nan behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
felixp8 committed Sep 28, 2023
1 parent 93d4e98 commit 2708ebe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/jazayeri_lab_to_nwb/watters/watterstrialsinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2708ebe

Please sign in to comment.