OS: MacOS 12.0.1 (Monterey)
PsychoPy version: 2021.2.3
What are you trying to achieve?: Two things. (1) I wish to know how accurate is the expInfo[frameRate] value that the data log file reports. (2) I want to present different stimuli each for 200 ms, then, on different trial types, wait for either 0, 200, 600, or 1400 ms before presenting another stimulus to which participants are to respond. RTs are recorded to that target stimulus.
What did you try to make it work?: Regarding (1) above, I present a stimulus for 40 frames (at least I think thats what 0 as the start frame and 41 as the stop frame does), then I record the stimulus duration in terms of a difference between its start and stop times in the log file. From that, I can calculate the āobservedā frame rate. I then compare this to the frame rate reported by the expInfo[frameRate] variable in the log file. Regarding (2) above, I have a variable (called TraceInt) in the Excel conditions file and each stimulus used in the experiment has a different value tied to it. The variable indicates the #frames to wait before presenting the target stimulus.
What specifically went wrong when you tried that?:
(1) The values I get for the observed frame rate and the reported frame rate from expInfo[frameRate] donāt agree. So, I am wondering whether the start/stop times in the log file are more accurate.
(2) The problem is that when running the experiment online, different usersā computers will have different frame rates. In order to ensure that the same 0, 200, 600, 1400 ms wait times are applied across different computer setups I tried introducing code (following a suggestion by Becca in the forum) in the builder window prior to the stimulus presentation that would normalize things based on the computerās frame Rate (from the expInfo[frameRate] variable. That code calculates how many frames on a given machine would be required to achieve 0, 200, 600, or 1400 ms. The problem is that I cannot figure out how to read the relevant variable (TraceInt) from the conditions file and then incorporate that into the code to compute the # frames necessary for that userās machine.
The code looks like:
waitFrames = int(200 / (1000/expInfo[āframesā]))
This should ensure that the wait time will be close to 200ms, independent of monitor frame rate. However, I need to replace the 200 with a variable (TraceInt) that changes from one trial to the next, and canāt see how to do that.
The other thing, of course, is that if the start/stop times is a more accurate way of determining the frame rate, then Iām not sure that this method would even work because it is based on the expInfo[frameRate] variable that may be inaccurate. For instance, when testing it out with a single value, 200, it reliably produced observed durations of ~135ms, not 200ms, on my screen.
Iād be very grateful if anyone can help with these issues.