-
Notifications
You must be signed in to change notification settings - Fork 0
Psychtoolbox
For basic use, please run this command at the start of your presentation script:
ptb_path_check('/Users/Shared/toolboxes/PTB_3012/Psychtoolbox')If that returns any error, check that PTB is indeed installed correctly. Get this function by downloading it here and then place ptb_path_check.m somewhere in your Matlab path.
When using Psychtoolbox, be wary of running it from the default install path. Someone else installing a new version could interfere with your experiment.
To avoid this, please run from a version-specific path, like:
/Users/Shared/toolboxes/PTB_VERSION_NUMBER/Psychtoolbox
To make this easier, we have a function to verify the path and PTB version. Before running any Psychtoolbox code, please run ptb_path_check(desired_path). For instance, to run Psychtoolbox v3.0.1.2, copy the correct install path to the shared folder, then, in your experiment code, run:
ptb_path_check('/Users/Shared/toolboxes/PTB_3012/Psychtoolbox')This will add this PTB path to your Matlab path, so that only that declared version of Psychtoolbox is used. Any other Psychtoolbox references are cleared from your Matlab path. This version information is then also in your experimental code for posterity
The Matlab function ptb_path_check can be found here (right-click on ptb_path_check.m, save-as).
For each computer, Psychtoolbox should be installed by:
- First, install as normal by running DownloadPsychtoolbox.m
- Do not delete any folders. Copy the PTB install folder a shared version-specific folder, like:
MAC: /Users/Shared/toolboxes/PTB_3012/Psychtoolbox
WIN: C:\Shared\toolboxes\PTB_3012\Psychtoolbox
-
Add ptb_path_check to the Matlab path - download it here
-
Run:
ptb_path_check('/Users/Shared/toolboxes/PTB_3012/Psychtoolbox')Confirm that Psychtoolbox and PsychJava are working correctly by running:
GetCharTestAsk Andrew if you have any problem with Psychtoolbox paths or installations.
- If using Mac, ensure the the kernel driver is installed for precise timing.
- KbCheck is often better to use than GetChar for precise timing.