LCE Kotisivu

S-114.3760 Practical 2 - Psychtoolbox


Psychophysics toolbox instructions

Check the installation

First steps, starting and installing the toolbox:

NOTE! You will get a window from Symantec Anti-Virus titled "Auto-Protect Results" from file nc.exe included in Psychtoolbox subfolder "PsychContributed" at this point. This is normal safety measure from Symantec anti-virus but nc.exe is NOT a computer virus. This error, however, will not affect the Psychtoolbox functions used here.

Test with MMN script that Psychtoolbox works

Second, test the included MMN demo

NOTE! If Psychtoolbox crashes / ends in an error only the output screen is shown (you will only see gray or black background, no Matlab windows or anything). In this case, you can switch to MATLAB with ALT+TAB (press TAB so many times you see MATLAB listed), and type (blindly) sca and hit enter. After this, you should see Matlab window again. This is because Psychtoolbox creates a "Screen" window covering any other windows, and the sca command, short for Screen('ClearAll'), clears all these windows at once. If this does not seem to work, either ask Jaakko for help or start up Task Manager by pressing CTRL+SHIFT+ESC, select Matlab process and kill it (note that unsaved data might be lost).

NOTE 2! The first parameter to mmn.m script tells whether to send parallel port output (1) or not (0). Remember to run the script in EEG recording session with mmn(1,0) or something like that. The parallel port output requires either administrator privileges or special settings, so it will not work in experiment design session.

Edit the script

Next, edit the MMN script to your own needs if it is suitable for you experiment.

You can get kind-of-log output from mmn script template by starting it with run1=mmn(0,0). After the script has ended, the parameter run1 includes information about what was presented and when. Check e.g. the timing between successive trials by typing plotdiff(run1) (plotdiff.m is included in the CD-ROM). If you have defined a constant ISI, the output should be more or less a straight line, with some jitter as the output is synchronized to monitor scanlines. If you use too short ISI, the computer might not be able to present the sounds fast enough. EEG laboratory computer can present individual sounds with 0.2-second ISI, but the computer class computers are not this good.

Optional: Use Sequence Maker for MMN stimulus order

You can use Sequence Maker to create simple MMN stimulus order. See the home page for instructions on different MMN paradigms.

To use Sequence Maker, use preferably the Matlab version included in the CD

NOTE! (28.11.2007) It seems that (at least) the combination of Oddball paradigm, Advanced settings and Psychtoolbox format results in a crash, probably due to bug in oddball sequence creation. So, only use the simple settings until the problem is resolved.

Update on the issue: (29.11.2007) The problem off oddball sequence creation with advanced options was due to some bug in Oddball sequence files, which led to use of identical port codes / trigger numbers for both standard and deviant. A quick fix would be to use both "advanced options" and "define own trigger codes" options to define different codes for different stimuli. Or, alternatively, after defining the standard and deviant, going back and forth a few steps (no need to change anything in the program, just click "< Back" and "Next >") and then choosing the format and file name. In any case, you should always check the output of Sequence Maker manually.

Download the updated sequence maker files from here (fixes also a stimulus timing issue). Either download the two updated .m files overwriting old ones, or download the complete zip package.


Tästä sivusta vastaa jkaurama(at)lce.hut.fi
Sivua on viimeksi päivitetty 29.11.2007
URL: http://www.lce.hut.fi/teaching/S-114.3760/