Paradigm File Format in BESA

From BESA® Wiki
Jump to: navigation, search

General remarks

A paradigm description file (“PDG file”) contains the information which is relevant for describing an experimental setup in terms of the stimulation and response events that occurred. To describe the experimental paradigm, three terms are introduced:

  1. An attribute is used to group trigger events into a certain class. For example, in an auditory experiment, triggers could be grouped according to an attribute “modality” to distinguish stimulation and response, and another attribute “side” to distinguish left and right.
  2. An attribute value defines how a trigger event is classified in the class defined by an attribute. For example, the trigger with the code 1 could be a tone stimulus, and the trigger with the code 2 could be the subject’s response. That means that for the “modality” attribute, trigger 1 would receive an attribute value “tone”, whereas trigger 2 would receive an attribute value “response”.
  3. A condition defines which trigger events form the set of events that should be averaged. For example, this could simply be all trigger events with the modality “tone”, or all trigger events which have the modality “response”, and follow a trigger event with the modality “tone”.

The PDG file is written in ASCII format and can thus be viewed and edited in any text editor. It is subdivided into a maximum of 9 sections:

  1. [Attributes] Attributes which are used to group the trigger events. This section is mandatory.
  2. [Values] A table of attribute values which are defined for the triggers used in the experiment.
  3. [Names] Names of conditions which are defined in detail in section 8
  4. [Epochs] For each condition, averaging epochs, baseline epochs, and some other epochs are defined
  5. [Thresholds] Threshold settings used for artifact rejection
  6. [Averaging] Defines which conditions are selected for averaging
  7. [Filter] Filter settings for averaging
  8. [TimeFrequency] Settings for time-frequency analysis
  9. [Selections] Each condition is written here as a statement using Boolean logic
  10. [ArtifactScan] The artifact scan results are written here

Most sections can be omitted; their entries are then filled with default values. The default settings are given in the detailed description (see below). The most relevant sections for describing an experiment are Attributes, Values, and Selections.

Connection to BESA paradigm editing tool: Sections 1 and 2 define entries in the “Trigger” tab. Sections 3 and 9 define entries in the “Condition” tab. Section 4 defines entries in the “Epoch” tab. Sections 5 and 10 define entries in the “Artifact” tab. Section 6 defines entries in the “Average” tab. Section 7 defines entries in the “Filter” tab. Section 8 defines entries in the “Coherence” tab (if available).

All values can be edited in the respective tabs of the paradigm editing tool.

Detailed description of the sections

Attributes

This section is mandatory. It holds the attributes which are used to group the trigger events. The first attribute is always the trigger code (“code”). Attributes are separated by a tabulator. By default, the ERP module defines a second attribute “name” which can take trigger names as attribute values.

Example:

[Attributes]
code	name	modality

Values

This section holds a table of attribute values which are defined for the triggers used in the experiment. Each row defines one trigger. The first column holds the trigger codes, since the trigger code is the only mandatory attribute. The second column holds the values for the second attribute (default in the ERP module: name), and so on. If no value is defined for an attribute, “NULL” is entered. For trigger codes which are not listed, no values are defined.

Example:

[Values]
0	NULL	NULL
1	tone	auditory
2	rare	auditory
3	frequent	auditory
128	response	motor

The trigger with code 0 has no values defined, the trigger with code 1 has the name “tone” and the modality “auditory”, and so on.

Names

This section holds the names of conditions which are defined in detail in the section “Selections”. It is not necessary to give names to conditions. By default, conditions are simply named “Condition 1” through “Condition 32”. If a name is given, it is followed by the zero-based index of the condition it refers to. This enables mixing of conditions with user-given names and conditions with default names.

Example:

[Names]
target	0
hit	1

The first condition obtains the name “target”, the second one obtains the name “hit”.

Epochs

This section holds the averaging epochs for each condition. Furthermore, additional epochs can be specified. Each epoch is defined by a floating point value which gives the pre-stimulus interval in milliseconds (ms), and a second floating point value which gives the post-stimulus interval in ms. Epochs are given in the following order:

Averaging epoch: The epoch used for averaging

Baseline epoch: The epoch over which the baseline is calculated

Epoch used for artifact rejection: The epoch in which the data are checked for artifacts

Stimulus artifact epoch: An epoch where a stimulus artifact occurred. This epoch is interpolated over before artifact rejection takes place

Stimulus delay: Only one value. This value gives the delay of the stimulus relative to the trigger event (e.g. when tactile stimulation is performed, where air pressure builds up after the trigger was set).

Not all epochs have to be provided. If the epochs list for a condition is incomplete, default values are used.

By default, the following values are used:

Epoch Pre-stimulus value Post-stimulus value
Averaging -100 500
Baseline -100 0
Artifact rejection -100 500
Stimulus artifact 0 0
Stimulus delay 0

Example:

[Epochs]
-500.0	1000.0	-100.0	0.0	-500.0	1000.0	0.0	0.0	0.0
-800.0	500.0	-800.0	-700.0	-800.0	500.0	0.0	0.0	0.0

The first condition is averaged from 500ms before the trigger event to 1000ms after the trigger event. Baseline is calculated in the pre-stimulus interval between 100ms before the trigger event and the trigger event. Artifacts are rejected between –500ms and +1000ms, i.e. over the entire averaging epoch. No stimulus artifact interval and no stimulus delay is given.

For the second condition, averaging and artifact rejection are set to –800...500 ms, and baseline calculation is performed in the interval from –800ms to –700ms. Again, no stimulus artifact interval, and no stimulus delay is given.

Thresholds

This section holds values for artifact rejection. It can hold two sets of values. The first set contains settings for the color normalization of the BESA artifact scan tool. These values are not directly used for artifact rejection, but merely for visual control if the BESA artifact scan tool is used for artifact rejection.

The line following the first set of values contains either the string “AUTO_REJECT”, or “MANUAL_REJECT”. The second set contains settings for automatic rejection of artifacts. It is used if the preceding line contains the string “AUTO_REJECT”. Otherwise, only artifacts which were manually marked in the data are excluded from the averaging process.

The following table gives the order of the entries in the thresholds section: