A problem came up when debugging

Hi Chris,

We were trying to debug a problem with reaction time earlier this week. To debug, I inserted a variable called “start_time” at the end of the “Stimulus On - Pre-Saccade” state to get the estimate stimulus on time and report “now() - start_time” at the beginning of the “Saccade” state so we could see the reaction time trial-by-trial at the rig. But we noticed an issue that is rather perplexing - the console reported the reaction time twice, one followed by the other immediately. This didn’t happen to all trials but a significant number of them. Was the protocol stuck in this state? Why would it repeat the first line of a state twice? I’ve attached the protocol and a screenshot of an example of what we saw at the rig. Thank you!

Best,
Taylor

[//cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex031/uploads/mworks/original/1X/fb2d0642a098f376e527c1bc4aba26aba24e98e8.png]

protocol_2afcLaser_DEBUG.mwel (55.2 KB)

Hi Taylor,

Was the protocol stuck in this state? Why would it repeat the first line of a state twice?

I think your experiment must be transitioning to state “Saccade” more than once before it gets to state “Success”. I see that states “Saccade to Window1” and “Saccade to Window2” will both transition back to state “Saccade” when variable saccade_to_window1 or saccade_to_window2, respectively, is false, but I don’t see how those variables get set. Is it possible that the value of one or both of those variables is changing unexpectedly?

Chris

Hi Chris,

That is likely. Window1 and 2 are two bigger, more generous saccade windows around the stimulus window. It is possible that the windows were too close to the stimulus window and it wasn’t working as the way we expected. We will do more testings with window 1 and 2 and see if we still have the same issue. Thank you!

Best,
Taylor