allensdk.brain_observatory.behavior.trial_masks module¶
- allensdk.brain_observatory.behavior.trial_masks.contingent_trials(trials)[source]¶
GO & CATCH trials only
- Parameters:
- trialspandas DataFrame
dataframe of trials
- Returns:
- maskpandas 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:
- trialspandas DataFrame
dataframe of trials
- threshfloat, optional
threshold under which trials will not be included, default: 2.0
- Returns:
- maskpandas Series of booleans, indexed to trials DataFrame