File tree Expand file tree Collapse file tree
src/aind_dynamic_foraging_basic_analysis/metrics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from aind_dynamic_foraging_data_utils import alignment as an
1111import numpy as np
1212import pandas as pd
13+ import warnings
1314
1415import aind_dynamic_foraging_basic_analysis .licks .annotation as a
1516
@@ -346,7 +347,8 @@ def get_average_signal_window(
346347 raise ValueError (f"alignment_event '{ alignment_event } ' not found in df_trials columns." )
347348
348349 if channel not in nwb .df_fip .event .unique ():
349- raise ValueError (f"{ channel } channel not found in df_fip." )
350+ warnings .warn (f"{ channel } channel not found in df_fip. Returning original df_trials." )
351+ return nwb .df_trials
350352
351353 if data_column not in nwb .df_fip .columns :
352354 raise ValueError (f"data column '{ data_column } ' not found in df_trials columns." )
You can’t perform that action at this time.
0 commit comments