I’m trying to capture event times (specifically keyboard events occurring every ~1.5s) that occur during a static component (clock.StaticPeriod). After the period, I am able to collect the events from the buffer, but the event times are inaccurate: they’re all within milliseconds from each other and align to the end of the period.
My question is whether I can capture event times for events that occur during a StaticPeriod? Note that I do not need access to these events during the period.
The application is that during an fMRI experiment, I collect the onset times of each imaging volume. The scanner sends a sync pulse that I transform to a USB keyboard input, for which I listen as a keyboard event in psychopy. Separately, I load images during certain down times in the experiment (a process that takes some time), and am currently using StaticPeriod to allow the clock to advance while I load these images so as to avoid delays. Of course, the scanner is sending the sync pulses continuously, including during these periods, and I’m attempting to capture them with getKeys(), but the timestamps are inaccurate (as described above). Is there a way I can get the desired functionality in psychopy? (Some other programs would allow an “asynchronous loop” – it seemed that StaticPeriod was the closest thing to this functionality, but perhaps there’s another way…?)
Thanks very much!