Skip to content

Fix autowater on ignore trials annotated as "earned" #104

Description

@arjunsridhar12345

Reward deliveries are being attributed to the wrong trial on ignore trials. The fix I think should be to match reward deliveries to the trial window from the trial outcome, not nearest Response event. Issue shows up mainly in disengaged sessions with lots of ignored trials

get_reward_deliveries assigns each reward delivery to the trial with the
nearest Response timestamp. Proximity matching has no notion of a trial
boundary, so a delivery can inherit a neighbouring trial's autowater state.

On an ignore trial the Response event fires at the response deadline (~5 s
after the go cue) while autowater fires at the go cue itself. When the previous
trial's response falls inside that ~5 s gap, it is nearer to the delivery than
the trial's own response, and the delivery takes the previous trial's
is_auto_reward_rightNone — and is annotated "earned" instead of
"auto".

See original issue: https://github.com/AllenNeuralDynamics/DF-Refactoring/issues/222

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions