Change blindness experiment measuring RT

Hello,

I am creating a change blindness experiment in a Psychopy v1.84.1.

In a single routine, I have two images that are presented for .36s each (there is just one slight difference between the two images). A blank screen is presented for .12s in between the two images as well as after the second image. This routine then enters a loop for 40trials, creating flashing images. Participants are required to watch the flashing images and detect the change, hitting the spacebar when they have found it.

I have managed to get the loop to work so that when the spacebar is hit once, both the routine and the loop terminate. However, what I am interested in is how long it has taken the participant to notice the change, i.e. RT of spacebar press. But, when I look in the excel output file, each row shows each trial, so that the RT for the spacebar press is only in relation to the beginning of that single trial. Therefore, it might say that the RT is 0.56s but actually because that participant is in trial 30, it has taken them quite a while longer to detect the change!

Does anyone have any advice on a code component I could add in to make sure that I am accurately recording RT from the very beginning of the onset of the flashing images, i.e. beginning of trial 1?

Thanks,
Lucy

Hi Lucy,

First - I’d strongly recommend updating to 1.84.2 since there are a few issues with that version that might cause you problems later.

Secondly - can you send a screen shot of your experiment so far - You can set the time that the keyboard component is created in each routine - so if you set the start time to 0.48s you’ll get the RT time since the second image appears.

BW

Oli

Hi Oli,

Thanks for recommendation - I will upgrade!

I have uploaded screenshot. Please just look at the routine ‘trial’ with is looped with ‘loop1’ - the rest are just instructions and central fixation crosses.

Sorry, I don’t know if I explained it clearly enough before above, the problem is that the routine (‘trial’ in my screenshot) loops around 40 times so that the images keep flashing back and forwards. All it is, is that one of the images has an object missing and the participant needs to spot that image. Each trial only lasts 0.96s. I want to know how long it took across (however many 0.96s trials it takes) for the participant to detect the missing object and therefore hit the spacebar, since the VERY first trial. Does that make sense?

Thanks,
Lucy

Ok - that makes sense. Try:

#Start of experiment
tStart = False

#Beginning of Routine
if tStart == False: #ensure that timer only starts on first trial
   timer = core.Clock() #start timer
   tStart = True

#Every Frame
if len(key_resp_2.keys) > 0:
   loop1.addData('noticedTime', timer.getTime()) #Add data to csv file
   loop1.finished = True
   tStart = False #Incase you want to do more than one trial

Best wishes,

Oli

Hi Oli,

Thanks that does seem to work great! - so the clock timer starts as soon as my first image in the routine is presented? My trouble now is that I want to be able to add another loop around routines ‘cross’ and ‘trial’ so that I can repeat the procedure for multiple different scenes. For each scene, there are two images that I want to be flashing. If i add in an outer loop which links to an excel file that’s fine, but the problem is, now the timer hasn’t reset, so all the RTs picked up for additional scenes will still refer back to the timer that started at the beginning of the experiment? I want the timer to restart for each scene, i.e. for each loop cycle of the OUTER loop (but not in the inner one). Does that make sense? Please let me know if I can clarify anything.

Thanks,
Lucy

Hi Lucy,

That makes sense - but can you verify that the timer is definitely not resetting? The line timer=core.Clock() should create a brand new timer every time it is called (I.e overwrite the existing timer) - which should only be when tStarted=False. If this is not the case then try adding timer.reset() under timer=core.Clock(),

Best wishes,

Oli

Hi Oli,

Thanks for your help - it works perfectly now!

Lucy

Hi Lucy,

Oli’s advice is spot-on for timing the response.

For a task like this (repeatedly showing images for a brief amount of time), there can be a few performance issues to be aware of, though.

(1) For example, it can take some time to open an image file from disk, decompress it, and get it ready for screen display. This might take longer than one screen refresh, which can lead to the image being on-screen later than you intended, and for a shorter duration.

One way to get around this is Builder is to “pre-load” the image before it is needed. For example, in your task, this could be done in the blank periods in-between stimuli. What you could do is replace your blank stimuli with a “Static screen period” (accessible from the Builder components pane under “Custom”). When one of these is inserted, its name becomes available in the popup button next to an Image component’s image field. This means the image will be loaded from disk during that period rather than at the beginning of the image component itself.

In your case, you might want to change the order of the blank periods so that they precede each of the stimuli rather than follow them (this will look the same on screen, except for the very first trial, which will start blank rather than with the image. But this should ensure that your stimuli are ready for display immediately, at the correct time.

(2) What is your screen refresh rate? Display periods of 120 ms and 360 ms are not possible with a 60 Hz screen, for example, as those durations are not integer multiples of the screen refresh period of 16.6666 ms. But a 100 Hz screen refresh rate would allow accurate display of these durations.

(3) Check your data output to make sure it has the right structure. e.g. if the inner loop is regarded as a “trial” loop, then most of the lines in your data output file will not have responses in them. You might want to play with turning off the “is trials” setting on the inner loop dialog, and manually saving the reaction time to the data file so that you get one line per actual trial. i.e. at the moment, a “trial” is conceptually up to 40 repetitions of the stimuli in your routine, rather than a single repletion of that routine. Make sure the data is formatted in the structure you need before running the experiment.

1 Like