Experiment object

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

An object of type experiment provides some options and record properties for a whole experiment. An experiment can only have one experiment object. You can add columns setting properties for it in the optional table for objects not specific to trial (experiment, device, staircase objects). [Or in the coding method: Make an experiment object outside trials using function experimentObject, set properties, and input it to 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 or for a given pretrial interval using preTrialBackColor. You can also override this for any part of a trial using a backColor element.

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 using input property report.

duration

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