I tried to optimise the file loading as you suggested. I used a 60hz screen with an already scaled image in a very fast computer with a good graphics card (I could not find a solid state flash drive).
I still had more or less the same delay.
As I need to have this experiment done asap, I manually added all the images I needed (164), each with its own different time-onset in milliseconds.
Although it is very inelegant, the synchronisation is perfect, so the problem was in the amount of time needed to read the image from the disk in the loop.
The thing is that now I don't know how to collect and store the correct responses and the RTs relative to the images.
I mean, I have 164 image-component (3/4 of them are a square picture, 1/4 of them are a triangle picture).
I want the participants to press a button only when they see a triangle, and to store this information, along with the RT.
I cannot use an excel file with both images in a column, because only one of the two images would be read and played, therefore I cannot use the $correct _answer column either. How could I do?
Also, I am adding a feedback routine, so that participants could see how many triangles they were able to detect.
I'm using this code in the Begin routine
Corr = loop1.data['key_resp.corr'].sum() #.std(), .mean() also available
meanRt = loop1.data['key_resp.rt'].mean()
msg = "You got %i trials correct (rt=%.2f)" %(nCorr,meanRt)
It worked with the version of the experiment with the loop, but now I don't know how to use it as I don't have a key_resp anymore. I guess the answer to this problem resides in the answer to the previous one.
Thank you so much