Why Tstop sometimes showing up as None

Hello everybody, we have been coding a basic experiment where a stimulus is presented during 200 ms; followed by a fixation cross for 300 ms and this is repeated during a 18 second block.

When I look at the data, sometimes, the tstop for the fixation cross shows as “None”, any reason to explain that?

it shows like that on the script:

Thanks!

Does that occur when the participant responds while the fixation cross is still visible (RT<300ms)? tStop would be none in that case because it wasn’t stopped at a specified time.

Hi @wakecarter, no I don’t have any participant’s response at all, just passive viewing of stimuli

is it possible that the image coming after the fixation cross arrives “too early” and therefore could mask the end of the fixation cross?

I was wondering something along those lines. I’m also intrigued by the start stone for the fixation being after the stop time. Please could you upload your psyexp file?

The one I’m using now is a py script since I have made some changes in the code itself , would that be ok ?
nf_face_task_v7_block1_lastrun.py (77.2 KB)

the .exp looked like this:

I’ve set up a demo in Builder myself and I think I have an answer for you.

In 25 iterations of 200ms image 300ms text I had two cases with a blank value for text.stopped. They coincided with the highest values of trial.stopped-trial.started (516ms) and image.stopped-image.started (218ms) .

I think what’s happening is that text is being ended by the trial ending (because the overall trial time is too long) rather than the trial ending because the text has finished. I’m not entirely sure while text.stopped is 16ms later than trial.stopped but I guess that must be because there is (normally) one last refresh to clear the screen after the trial has decided to stop.

Seems like 16 ms is 1 frame with a refresh rate of 60Hz ; so looks like this is just about technical set up of the computer more than code issue then , right ?

That’s my thinking. In a perfect world every iteration would have identical timing but in reality there is a bit of variation which can cause one of two ending conditions. I think this might be related to “non-slip timing” to ensure that a routine with a fixed duration doesn’t stray too far from it’s target due to the sum of small variations in the individual components.

I see , that confirms what I was thinking, and I guess my experiment can tolerate an 16ms delay as this is for fMRI ; and we will use a block design approach to capture the block of images so it should be ok
Thank you so much for your help and advice!

The amount of variation will depend on the hardware. Are you seeing a trial.stopped column? My best guess is that if fix_n1.stopped is None then you could replace the value with trial.stopped

However, @TParsons might be able to confirm this with more authority.

That’s a good idea!
I will give it a try