Holcombe:VerifyTiming: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
{{Template:Holcombe}} | {{Template:Holcombe}} | ||
==Precautions to avoid timing problems== | ==Precautions to avoid timing problems== | ||
* | * Having a USB external hard drive connected as OSX's TimeMachine drive can take about 3 ms every 10-20 trials. | ||
* | * Best to disconnect one's Ethernet cable | ||
* When using two screens, the presence of the mouse polling and other things for the second screen can also cause timing hiccups. Try to use one screen- on a laptop, close the main LCD screen and wake the machine from sleep with just the second screen by connecting an external keyboard or mouse and clicking. | |||
* May want to quit finder. To do so, include these lines in python script: | * May want to quit finder. To do so, include these lines in python script: | ||
import os | import os |
Revision as of 04:37, 13 July 2009
Recent members• Alex Holcombe
|
Projects• Testing Booth Calendar |
|
Technical• Skills Checklist |
Other• Plots,Graphs
|
Precautions to avoid timing problems
- Having a USB external hard drive connected as OSX's TimeMachine drive can take about 3 ms every 10-20 trials.
- Best to disconnect one's Ethernet cable
- When using two screens, the presence of the mouse polling and other things for the second screen can also cause timing hiccups. Try to use one screen- on a laptop, close the main LCD screen and wake the machine from sleep with just the second screen by connecting an external keyboard or mouse and clicking.
- May want to quit finder. To do so, include these lines in python script:
import os applescript="\'tell application \"Finder\" to quit\'" shellCmd = 'osascript -e '+applescript os.system(shellCmd)
Visual
To create custom resolutions and refresh rate modes for the screen if not available in System Preferences->Displays, use DisplayConfigX
Ideally, your program synchronizes drawing of the stimulus with the refresh of the CRT. To do this, you have to use particular techniques for drawing. Psychopy has some code included for checking interframe intervals with the system clock, see this page on the psychopy wiki
Once you think you've done it properly, best to further verify that stim drawing is synchronized with the CRT.
- Use the tachometer
- It lives in a box on the shelf of the lab
- Use an oscilloscope
- Visually verify that no screen refreshes are missed
- e.g. my screenRefreshTest.py program exchanges the location of a black and white circle, one off screen and one on screen, every frame. Viewing the display, if any frames are missed, screen flicker should visibly stutter. Fortunately even at 160 Hz 800 by 600, frames are never missed until I try to draw about 10 circles every frame
Sound
Here Media:AudioAndUSBnotesWithPython.oo3 is the file with all my notes on different ways to play a sound in Python and the associated latencies and standard deviations of the latencies--Alex O. Holcombe 05:15, 25 June 2008 (UTC)
We used the oscilloscope to measure audiovisual synchrony using this stimulus: The results are in this table: