Psychophysics Toolbox
Library
Tutorials & Documentation
Examples
MEX & DLL files
fMRI
Related

This page is old, new software should go to the Wiki pages. Eventually this material will be added to the Wiki pages. The philosophy is unchanged, but the Wiki pages allow users to add directly, without going through a middle man.

Writing code from scratch is hard. It's much easier to edit an already working program that does something similar. We are building here a library of user-supplied programs that run real experiments and demos, as examples for others. Please share your working programs to help others get their experiments going.

We invite everyone to announce software on the Psychtoolbox forum, when they place it on the Wiki pages.

Please put your software into a zip archive before putting it on Wiki.

As it becomes more common to cite web resources, the thought that one's software could be acknowledged in print may induce more people to donate software as examples for others. This is new territory, in which everyone is still finding their way, but we're finding it natural to include URL links in our writing, so that, for example, one might say, "Our stimulus presentation software was based on Charles Collin's matpong.m table-tennis game <http://www.yahoogroups.com/message/psychtoolbox/251>."

Denis & David


Tutorials & Documentation

Programming vision experiments with Matlab and the Psychtoolbox - Ione Fine

Ione's lecture notes from her course on creating vision experiments using Matlab and the Psychtoolbox are available in PDF, RTF and Word formats. Appropriate for those with no experience programming, or skip the first eight chapters if you have experience.


Examples

You'll need the free Stuffit Expander program to unpack the enclosures in these donations. If you don't find what you're looking for here, you can search the forum. And if you end up writing it yourself, please consider sharing it with the next person, by sending it to the forum.

Calibration tools - David Brainard

Create a calibration file, dump its contents, and perform a simple linearity check. Assumes you have a radiometer interfaced to your computer.

Color lecture demos - David Brainard

Quick demos of some basic principles of color vision (color mixing, threshold measurement, etc.).

matpong - Charles Collin

A "video tennis" (i.e., Pong™) game for the Psychophysics Toolbox.

Use PsychSerial to control the ViewPoint eye tracker - Daniel Shima

I am attaching four files that serve as an intro and demo for new users of the ViewPoint eye tracker who want to communicate serially between it and Matlab. [IMPORTANT: You must use the PsychSerial.mex of the new Psychtoolbox 2.52. It reads binary and supports the new expirationSecs parameter.] Keywords: measure eye movements. 9 August 2002.


MEX & DLL files

 

PSIGNIFITJeremy Hill and Felix Wichmann

Maximum-likelihood fitting and significance testing software for psychometric functions. PSIGNIFIT is a multi-platform software tool for fitting sigmoidal psychometric functions to psychophysical data, taking into account possible "nuisance" parameters such as the observer's lapse rate, assessing goodness-of-fit by Monte-Carlo simulation, and providing confidence intervals via bootstrap methods.

OpenGL — Ben Singer

SimpleGL is a Matlab extension file (for Mac) to use OpenGL.

Page flipping and double buffering — Ben Singer

A MEX function to do page flipping on some displays. See Ben's page-flipping page. Our questions page explains page flipping and how it's used to do double buffering to avoid the "tear" artifact.

Moving random dots — Mike Shadlen and colleagues

A MEX function that displays random dots in motion. Download. 20 June, 2001.

Anti-aliased line drawing — Leola Reese

A MEX function for drawing thin high-contrast grayscale anti-aliased lines. warn Worked with Psychtoolbox version 2.1, but would need to be recompiled to be compatible with the current Psychtoolbox. Download. 26 August 1997.

Use PR-650 from WindowsWandell Lab

MATLAB code developed by the Wandell Lab at Stanford for interfacing to the PhotoResearch PR-650 from MATLAB, on the Window's platform. There is a RAR archive containing the code and a TEXT file with examples of usage. They write: to use this code and connect to the PR-650 we strongly recommend you use an ATEN (or equivalent) USB to Serial converter. When we try to use serial port to serial port only, Matlab has a lot of trouble. With such a serial to USB converter, we have not had much trouble even in 6.5. We also recommend you go to Matlab 7.0 on Windows/XP. August 21, 2005.

Use CMU button box — Brian Stankiewicz

A MEX function that talks to the CMU button box. See Brian's MEX page. [On 6/18/02, Brian wrote, "The CMU BBox bbox software needs updating and I just don't have the time right now to do it. (It was originally developed using Think C and I am not a Metroworks guru yet.) ... The main problem is that the program only looks at the printer port for the CMU bbox. The -serial converter and PsychSERIAL work fine with the bbox, but my code cannot access the bbox that way right now. I would be happy to provide and supply whatever is necessary to do this updating."]

For recent information the CMU button box mex file see this forum message and others in the same thread.

Create linear lookup tables — Brian Stankiewicz

A MEX function that reads a LuminanceRecord created by Denis Pelli's CalibrateLuminance program (in the demos folder of the VideoToolbox) and creates a lookup table to linearize the monitor's gamma. See Brian's MEX page. 21, 2005.

Matced is a CED-1401 Matlab interface - Dario Ringach

An interface allowing Matlab to directly control the CED-1401 data acquisition system.

KeMo source code, in C, for measuring keyboard reaction time - Dan Costin

See our KeMo page.

Use Eyelinkİ gazetracker - Frans Cornellisen and Enno Peters.

See the Eyelink Toolbox page. 22 June, 2001.

matlabPyrTools - Eero Simoncelli

Matlab source code for multi-scale image processing. Includes tools for building and manipulating Laplacian pyramids, QMF/Wavelets, and steerable pyramids.

Filetype extensions - Erik Johnson

Get and change file type and creator of a Mac file.


fMRI

Psychtoolbox with Siemens MRI scanner - Russell Poldrack

Russell reports success using the Psychtoolbox with a Siemens scanner and the Rowland Response Box to collect subject responses in the scanner.

VVRC IFIS-Psychtoolbox Interface for fMRI - Allen Ingling

Software for synchronizing stimuli with MRI scans and collecting subject responses using prototype hardware from PST and a National Instruments digital I/O card. The software is configured for use specifically with hardware at the VVRC site and is not directly portable, but it could be adapted for use at other sites. The interface is currently maintained by Dan Shima.

Synchronizing stimulus presentation with an MRI scanner - Michael S. Beauchamp

MovStim reads in the name of stimuli from an ASCII text file and then presents them to the subject synchronized with the MR Scanner; the exact start and stop times of each clip are saved to a text file, and an output pulse is generated at each stimulus onset as an additional check on timing. Requires the Psychtoolbox and other support files, including files adapted from the VVRC IFIS-Psychtoolbox interface.

 


Related

PsychPy: Psychology Software for Python - Jon Peirce

An open-source package for creating psychology stimuli in Python, it combines the graphical strengths of OpenGL with the easy Python syntax to give psychophysics a free and simple stimulus presentation and control package.

VisionEgg - Andrew Straw

An open and free programming environment for generating visual stimuli for Psychophysics. Based on the Open Source scripting language Python and using PyGame, a Python binding to SDL and OpenGL.

Octave

Octave is a free numerical programming environment distributed under the GNU General Public License and compatible with Matlab 4 syntax. (Structs and cell arrays were added in MATLAB 5). Available for Linux, Windows and OS X. The OS X version can be installed using the Fink package manager.

Cogent 2000 - John Romaya, Oliver Josephs, Tomas Franzon and others

Like the Psychtoolbox, a set of Matlab extensions for presenting visual stimuli. Based on DirectX.

RSVP for Mac OS - Pepper Williams, Michael J. Tarr, Steve Finney and Timothy Bates

A simple scripting language for presenting canned stimuli stored as PICT, sound resource, or QuickTime files and collecting and recording subject responses.

MatVis and WinVis - Neurometrics Institute

Commercial software for designing vision and neuroscience experiments using Matlab.

Within-subject ANOVA graphical user interface(GUI) - Erin Harley

Analyzes a single or double-factor design and returns an ANOVA table, a means table and standard
error. MATLAB's Statistics Toolbox is NOT needed to run the GUI.

 

 


visitors since 25 May 2002.

David Brainard, Denis Pelli & Allen Ingling.
psychtoolbox@yahoogroups.com

9 August 2002