AllenNeuralDynamics / aind-dynamic-foraging-data-utils

Tools for the analysis of behavior and neural data from the dynamic foraging task
MIT License
2 stars 0 forks source link

Add the ability to censor event triggered responses by subsequent events #38

Closed alexpiet closed 2 months ago

alexpiet commented 3 months ago

Is your feature request related to a problem? Please describe. When computing an event triggered average, we might want to censor data that happens after a second event (like the next reward, or a subsequent stimulus).

Describe the solution you'd like The event triggered response function should accept an optional argument censor, which defaults to None. Options include either the string self meaning to censor on subsequent events of the same type we are aligning to, or a list of times to censor. Note that we want to censor both forward and backwards in time.

alexpiet commented 2 months ago

Partially resolves by #39, which allows the user to censor based on subsequent events of the same type. However we should be able to pass in a list of times to censor on.