diff --git a/src/aind_dynamic_foraging_basic_analysis/metrics/trial_metrics.py b/src/aind_dynamic_foraging_basic_analysis/metrics/trial_metrics.py index ee29713..2dfdd41 100644 --- a/src/aind_dynamic_foraging_basic_analysis/metrics/trial_metrics.py +++ b/src/aind_dynamic_foraging_basic_analysis/metrics/trial_metrics.py @@ -16,6 +16,7 @@ LEFT, RIGHT, IGNORE = 0, 1, 2 + def compute_trial_metrics(nwb): """ Computes trial by trial metrics @@ -41,7 +42,6 @@ def compute_trial_metrics(nwb): df_trials = nwb.df_trials.copy() - # --- Add reward-related columns --- df_trials["reward"] = False df_trials.loc[ @@ -147,7 +147,6 @@ def compute_trial_metrics(nwb): df_trials.loc[i, "n_valid_licks_right"] = 0 df_trials.loc[i, "n_valid_licks_all"] = 0 - df_trials["RESPONDED"] = [x in [0, 1] for x in df_trials["animal_response"].values] # Rolling fraction of goCues with a response df_trials["response_rate"] = ( @@ -191,7 +190,6 @@ def compute_trial_metrics(nwb): ] df_trials = df_trials.drop(columns=drop_cols) - return df_trials @@ -291,5 +289,4 @@ def compute_bias(nwb): df_trials["bias_ci_lower"] = df_trials["bias_ci_lower"].bfill().ffill() df_trials["bias_ci_upper"] = df_trials["bias_ci_upper"].bfill().ffill() - return df_trials