Experiment object

The experiment object is optional. You only need to make one if you want to change a property from default. Note for some properties you can also change the defaults themselves using pb_prefs, which may be more convenient.

An object of type experiment provides some options and record properties for the whole experiment, e.g. background color. In an experiment script you can make one outside trials using function experimentObject and add it using addToExperiment.

Input properties

showOpening

Default: show opening display and prompt to start

showOpening = <cd>true<cd>/<cd>false<cd>: show opening display and prompt to press Space to start. <cd>false<cd> = open the experiment with a black screen and start it immediately when ready.

backColor

Default: black

A 1×3 RGB vector with numbers between 0–1 setting background color for the experiment.​ You can override this for a given trial using trial object property backColor. See also trial object property preTrialBackColor.

showFrameworkMessages

Default: current Psychtoolbox settings (standard messages)

A number setting the types of messages Psychtoolbox shows in the MATLAB command window. Note this doesn’t affect all Psychtoolbox messages, but many of them.

<cd>0 <cd> – minimal
<cd>1 <cd> – add error messages
<cd>2 <cd> – add warnings
<cd>3 <cd> – add standard messages
<cd>4 <cd> – add extra messages

This goes to Psychtoolbox Screen('Preference', 'Verbosity') and similar commands.

<cd>[]<cd> = current Psychtoolbox settings. Psychtoolbox defaults in turn are generally 3 (standard messages). If you leave showFrameworkMessages at default, you can also use the corresponding Psychtoolbox commands directly before the experiment.

priority

Default: current Psychtoolbox setting (lowest priority, highest compatibility)

An integer ≥ 0 setting MATLAB CPU usage priority. Higher priorities may improve timing precision in experiments where that’s important, but high priorities may cause compatibility problems. This goes to Psychtoolbox Priority. See help text there for more information.

<cd>[]<cd> = current Psychtoolbox setting. Psychtoolbox default in turn is 0 (lowest priority, highest compatibility). If you leave priority at default, you can also use the Psychtoolbox command directly before the experiment.

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results by listing them input property report.

duration

Experiment duration from trial 1 start to last trial end (sec).