Closed ZhixiaoSu closed 2 months ago
@ZhixiaoSu There is an edge case. The old session does not have obj.TP_RewardDelay
.
@ZhixiaoSu There is an edge case. The old session does not have
obj.TP_RewardDelay
.
@XX-Yin Can I fix it by first checking if it has the field? If it doesn't, I'll put it as 0.0.
0.0
Yes, it will work. You can run the file directly to pass the test.
Update: set default to 0 to take care of earlier sessions without reward delay parameter by setting it to 0.
Pull Request instructions:
Describe changes:
What issues or discussions does this update address?
This columns makes it possible to calculate actual reward delivery time when there's a reward delay in session.
Describe the expected change in behavior from the perspective of the experimenter
There will be no change in behavior.
Describe any manual update steps for task computers
There will be no manual update,
Was this update tested in 446/447?
No, it is tested locally on my laptop and desktop.
Additional info:
In current version, 'reward_outome_time' is the time when reward is determined, not when it is delivered. If a choice is made, it's time of first lick, if not, it's time of end of lick window. It makes sense in sessions where there's no reward delay. But when we introduce a reward delay, this time should be called 'response_time' or 'decision_time' and additional 'reward_delay' information (not saved in nwb yet) should be added to calculate time of outcome.
Given how big impact this file may have downstream, minimum change is made here to enable analysis. One column called 'reward_delay' was added to NWB.