Skip to content

Commit

Permalink
fixed trials table temporal alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Dec 19, 2024
1 parent 0b2969d commit ae36992
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def add_to_nwbfile(
if dtype == "bool":
trial_array[np.isnan(trial_array)] = False
trial_array = np.asarray(trial_array, dtype=dtype) # Can't cast to dtype right away bc bool(nan) = True
if normalize_timestamps and name in ["time_reward_s", "opto_time", "opto_time_end"]:
trial_array = trial_array - starting_timestamp
name_to_trial_array[name] = trial_array[~trial_is_nan]

# Add Data to NWBFile
Expand Down

0 comments on commit ae36992

Please sign in to comment.