allensdk.brain_observatory.behavior.trial_masks module¶
-
allensdk.brain_observatory.behavior.trial_masks.
contingent_trials
(trials)[source]¶ GO & CATCH trials only
Parameters: - trials : pandas DataFrame
dataframe of trials
Returns: - mask : pandas Series of booleans, indexed to trials DataFrame
-
allensdk.brain_observatory.behavior.trial_masks.
reward_rate
(trials, thresh=2.0)[source]¶ masks trials where the reward rate (per minute) is below some threshold.
This de facto omits trials in which the animal was not licking for extended periods or periods when they were licking indiscriminantly.
Parameters: - trials : pandas DataFrame
dataframe of trials
- thresh : float, optional
threshold under which trials will not be included, default: 2.0
Returns: - mask : pandas Series of booleans, indexed to trials DataFrame