SmithLabNeuro / Ex

Experimental Software
8 stars 1 forks source link

Timing related to stimulus duration where stimuli turn on/off (stimuli last an extra frame or two) #8

Open mattslab opened 1 year ago

mattslab commented 1 year ago

If we use msgAndWait to turn stimuli on/off, there is a lag because of the waiting for the function to return until the stimulus is actually off. This can lead to a stimulus presentation that you want to be 100 ms to really be 120 ms (checked with the diode). There's not really an easy way around this other than compensating by requesting less time, probably. But we should do some checking on timing and make sure that everything is well aligned between what you ask for, and what you get. If you use the timed option for a stimulus, this goes away (because showex counts the frames that something is on). This is a problem only when you try to time the stimulus yourself in runex, which leads to some inevitable issues in timing.