Skip to content

Fill in the Conversion Configuration File

The Salzburg MEG template creates a file called config.yaml in your dataset project. This file tells the MEG BIDS conversion pipeline how to map trigger codes to event labels. You must fill it in before your first acquisition.

Editing the file in GitLab

  1. Navigate to your dataset project on the ANC.
  2. In the file list, click .meg_conversion_config.yml.
  3. Click the Edit button (pencil icon) in the top right of the file view and select Edit single file.
  4. Make your changes directly in the editor.
  5. When done, scroll down, add a short commit message (e.g. Fill in conversion config), and click Commit changes.

File structure

The config file uses your project slug as the top-level key. Under it, you define who to notify, how to handle participant IDs, and — most importantly — how to map trigger codes to BIDS event labels.

your-project-slug:
  hashParticipantID: false
  email:
    - you@institution.edu

  events:
    1:
      label: "stimulus_onset"
      type: "stimulus"
    2:
      label: "response_correct"
      type: "response"
    "10-20":
      label: "tone_low"
      type: "stimulus"

Fields

your-project-slug (required)
Replace this with the URL slug of your dataset project (e.g. my-meg-study). This must exactly match the slug set when creating the project.
hashParticipantID (required, boolean)
Whether to hash participant IDs for anonymisation before conversion. Set to true to anonymise, false to keep IDs as entered in the filename.
email (required, list)
One or more email addresses to be notified after a successful conversion. Add one address per line, each preceded by -.
events (required)

Maps trigger codes to BIDS event labels and types. Each entry is either a single code (integer) or a range (quoted string, e.g. "10-20"). All codes in a range receive the same label.

Each event entry requires:

Field Description
label The value written to the trial_type column in events.tsv. Use short, descriptive names without spaces (underscores are fine).
type Either "stimulus" or "response".
How to plan your trigger codes and event labels

Before filling in the config, list all trigger codes your stimulus software will send and decide on a label for each.

Trigger channels and reserved codes

The MEG system sends digital trigger codes via channels STI001STI008. Codes 0 and 255 are hardware artefacts — always add them to ignore_triggers. Do not assign them to experimental events.

Choosing labels and types

  • Use "stimulus" for any event delivered to the participant (visual, auditory, tactile).
  • Use "response" for button presses, voice onset markers, or any participant-generated event.
  • Labels become the trial_type column in events.tsv — keep them short, descriptive, and without spaces (underscores are fine).

Single codes vs. ranges

  • If a range of codes encodes a continuous variable (e.g. stimulus ID 1–100 for different items), use the range format and give it a single descriptive label.
  • If individual codes within a range carry distinct meanings, list them separately.

Task, session, and run structure

Also decide on task name(s), session labels, and run numbering before acquisition — these go into the .fif filename (see Step 2 — Data acquisition) and must be consistent across all files in your dataset.

Example — fully filled in

This example is from an audiobook vocoding study with six vocoding conditions and three response types:

audiobook-vocoding:
  hashParticipantID: false
  email:
    - researcher@plus.ac.at

  events:
    22:
      label: "response_correct"
      type: "response"
    33:
      label: "response_wrong"
      type: "response"
    44:
      label: "response_no_response"
      type: "response"
    "51-74":
      label: "stimulus_original"
      type: "stimulus"
    "81-104":
      label: "stimulus_7chan"
      type: "stimulus"
    "111-134":
      label: "stimulus_5chan"
      type: "stimulus"
    "141-164":
      label: "stimulus_3chan"
      type: "stimulus"
    "171-194":
      label: "stimulus_2chan"
      type: "stimulus"
    "201-224":
      label: "stimulus_1chan"
      type: "stimulus"