Skip to content

Commit

Permalink
sanity check for df_events and fip_df test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpiet committed Nov 1, 2024
1 parent 5b447ae commit ac84076
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aind_dynamic_foraging_data_utils/nwb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ def create_events_df(nwb_filename, adjust_time=True):
trial_index.append(starts[-1])
df["trial"] = trial_index

# Sanity check that the first go cue is time 0
gocues = df.query('event == "goCue_start_time"')
if (len(gocues) > 0) and (adjust_time):
assert np.isclose(gocues.iloc[0]['timestamps'], 0, rtol=0.01)
return df


Expand Down

0 comments on commit ac84076

Please sign in to comment.