Scripting Language – Design Concept

Cognition Lab is offering a powerful scripting language (ERTS) that can be used by students without coding skills to create or modify cognitive task paradigms. This language has been used by hundreds of academic institutions to setup cognitive experiments (search ERTS – Experimental RunTime System, Berisoft).

For creating and sharing scripts, take a look at Cognition Lib. This web site is a free open source community for ERTS Scripts providing an online editor, instant preview, and error handling to help you develop scripts. Once your script is ready, just copy/paste it into Cognition Lab as a custom script paradigm and start collecting data.

Stimulus Material

The ERTS Script language offers a variety of different data types to define the stimulus material of your experiment:

PICTURE Visual stimulus material (including instructions) is defined using the PICTURE data type. This data type supports a variety of different flavors of visual stimuli, e.g. text, graphics, Gabor, and video (mp4, webm, ogg). Pictures can be displayed on any screen location in different rotations.

POSITION The POSITION data type defines screen locations on which a Picture will be displayed. ERTS uses a logical millimeter coordinate system which may be adjusted to actual monitor dimensions.
A position definition may consist of multiple screen coordinates to form circles, grids, or lines that may be used to randomly positioning Pictures.

TONE The Tone data type is used to define all types of auditory stimuli. ERTS supports the definition of sine wave tone (CHROME only) and external sound files (mp3, wav, ogg).

COLOR The color data type is used for defining foreground and background colors. Colors can be defined in RGB or HSV color space.

FONT. This data type defines fonts for text pictures. What font is exactly available depends on the OS and browser.

SET. The set data type is used to group data objects into sets that an be used for random processes. A set definition may consist of a list of data objects like pictures, positions, tones, colors, or fonts. During the experiment you can then randomly draw from a set to realize randomization that goes beyond the permutation of trials.

Response Keys

All standard key names of the PC keyboard are predefined, but they can be grouped and referenced explicitly to activate certain keys and define key sequences:

KEY This data type is used to define the response keys that will be used in an experiment. All standard key names of the PC keyboard are predefined. Adding a ‘^’-symbol to the key name refers to the release event instead of the press event.

Procedural structures

Procedural commands are used to define the event sequence of an experiment. The ERTS script language supports three levels to define the event flow.

Trial A trial definition consists of several trial commands that define the actual events as experienced by the test participant. A trial definition with one or more variable command arguments is called a trial schema. In this case the final values for the trial commands will be defined later at the block level.

Block A block definition lists the trials which should be executed within this block either in fixed or random order. If trials have variable arguments, they must be specified at the block level. The values of a trial specification are captured in the result file to document the independent variables for each trial.

Session A session definition defines the overall structure of an experiment. This structure is a composition of trials and blocks that are executed in the order as defined.