psychopy.org | Reference | Downloads | Github

Timing in seconds or frames

Hi everyone, I am creating an experiment were I am recording EEG and am interested specifically in the few second long delay periods in-between stimulus presentations. I know coding it up to use frame rate rather than seconds will be more accurate in time, but I am not sure how to translate it from seconds to frames and I am not sure what computer I will be running it on in the first place so I do not know the frame rate I will be working with.
Will it make that much of a difference that it is highly recommended I switch my timing over to go by frames instead of seconds given I am interested in the EEG in a 3-5sec window of time per trial? Or, if I end up running it on multiple different computers, is it safest to keep the timing in seconds?
Thanks for any insights

Hi There,

It is most accurate to time in terms of frames, what you could do is use the variable expInfo['frameRate'] to calculate how many frames you need for your desired time - that variable will give you the frameRate of the individual set up so it should translate across devices.

For example, if I wanted to present something for 50ms (or as close to as pos) across devices I could say

presentationFrames = int(50 / (1000/expInfo['frames']))

then use the variable presentationFrames in the duration field of your stimulus.

Hope that helps,
Becca

This is perfect. Thankyou