Currently I do all my psychophysics development under Windows with the Psychophysics ToolBox, version 2.54. It's pretty mature and mostly bug free, at least under Matlab 6.5 - 2007a. Sadly, it's not really updated anymore, and there's at least one show-stopper bug in WaitSecs, so if you use this platform be sure to download the patch here, or download my forked PTB 2.54 version which has all the official patches plus a few additions back-ported from the new version of 3.x (my changes are described here). Note that I have not tested Matlab versions later than 2007a, and it is possible that these versions may not work with my code, due to changes in how mex code is loaded.
Note: I hear that the new openGL version (3.x) of Psych Toolbox is pretty good, but for now I use 2.54 since 3.x breaks backwards compatibility.
Use this code on this page as you wish. If you find
the code here to be significantly useful, feel free to acknowledge
its source. If you have any questions about this code, feel free to
imgShow is a
simple tool for experiments with multiple trials, where each trial is
made up of multiple images. The code is relatively well documented.
psycho_sin_demo is a example of animating a sine wave grating and reading keyboard input. Not a full fledged experiment, but a place to start. We use it for teaching the basics of the toolbox, and then ask students to write the program below, which usually takes about 2-3 hours for moderately capable Matlab programmers.
psycho_detect_motion - experiment for finding a contrast detection threshold for a moving grating. Based on psycho_sin_demo. Designed for teaching purposes, this experiment is written to be easy to understand, and does not control for timing as well as would be necessary on a low-end machine.
Monitor Linearization Toolkit - a collection of code that attempts to linearize the output of your monitor by setting the Windows gamma ramp. Makes no assumptions about how luminance relates to DAC values, but instead uses interactive approximation driven by a CRS colorCAL photometer.
(c) 2008 Alan Robinson (robinsoncogsci.ucsd.edu)