Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed trials table temporal alignment #22

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading