Hi Becca,
As always, thank you for your information.
Just few clarification in order to see if I get the point.
This implementation seems fine (although I am not sure that the +1 is needed because something can be “undrawn” and another thing “drawn” on the same frame if that makes sense).
Yes, this was my first concern about how to work with frame duration (instead of seconds). My reasoning was that starting from 0 my stimulus lasts for 3 frames. If I want to set the mask starting point, I have to set the first available frame after the target duration. Do you think that is better to drop the +1?
This is fetched automatically and available using the variable
expInfo['frameRate']BUT if frame rate cannot be measured reliably (e.g. because lots of frames are being dropped) a 60Hz refresh rate is assumed.
This is great. However in this post this method they said that the frame rate estimation of online studies is not implemented yet (core/Window.js - PsychoJS API).
Given your information, my final approach should be:
- Choosing a stimuli duration in seconds (maybe 60hz friendly)
- Estimating the refresh rate using the above methods
- Finding the closest number of frames that ensure the desired duration
- Set these frame as experiment timing
What do you think?