Using DMDX for fMRI experimentsMatt Davis and Mike Ford
- Timing issues for fMRI experiments
- Why use DMDX for fMRI experiments?
- Limitations of DMDX
- How does DMDX work?
- What's in an item file?
1. Timing issues for fMRI experimentsTriggers from the scanner are organised by TR (repeat time)
If ISI (inter-stimulus interval) is a multiple of TR then stimuli can be triggered directly from the scanner. For example:
Since the scanner takes images of slices of the brain at regular intervals through the TR this creates a confound between where in the brain is being imaged and time post-stimulus. This is discussed further in:
Price, C.J., Veltman, D.J., Ashburner, J., Josephs, O., Friston, K.J. (1999) "The critical relationship between the timing of stimulus presentation and data acquisition in blocked designs with fMRI". NeuroImage, 10, 36-44.
Price et al. recommend that ISI is not a direct multiple of TR and show that additional activations can be detected when using an ISI that is not a direct multiple of the TR. However, the mechanism by which changes in TR affect BOLD signal may not be as described by Price et al.
In order to use an ISI that is not a multiple of the TR requires software that can keep accurate timing for extended periods of time. A missed trigger caused by the software over-running would lead to an extended period in which subjects are not presented with any stimuli. DMDX is one software package that has sufficiently accurate timing to make missed triggers unlikely - though you still ought to check the timing of your experiment carefully before testing subjects at WBIC.
2. Why use DMDX for fMRI experiments?DMDX can control the presentation of many types of stimuli
written words (in a variety of fonts and languages)
pictures (using .bmp files)
auditory stimuli (using .wav files)
digital video (using .mpg, .avi, quicktime files)
DMDX offers precise timing of stimulus presentation and subjects responses
e.g. presenting visual stimuli for a single raster-cycle (approx 10msecs)DMDX has been interfaced with the scanner
combine and control different types of stimuli in the same experiment
millisecond accuracy for button-press responses
4 button response box is set up and has been tested for use in the magnet
there is a dual-monitor set-up (so you can keep track of RTs and errors whilst subjects are in the scanner)
stimulus presentation and responses can be synchronised with image acquisitionDMDX is usable by non-programmers
DMDX can be triggered every TR (event or trial based designs) but has sufficiently reliable timing to be triggered with many intervening TRs
Script files are rich text files (.rtf)DMDX runs under Windows 95/98
Scripts are created using standard applications (spreadsheet, word-processor etc.)
Experiments can be pre-tested before going to the WBIC
Behavioural data can be collected at the CBU using the same software
3. Limitations of DMDXDMDX is designed for experiments with a regular, predictable stimulus presentation
experiments in which trials depend on whether preceding trials were correct or incorrect (e.g. incremental span tasks) are difficult (but not impossible) to set up.DMDX was designed for experiments requiring simple response measures
experiments with individually (subject by subject) randomised timing of stimulus presentation are problematic (can randomise the order of presentation within an experiment).
DMDX is not suitable for experiments where unique stimuli are generated for each subject (e.g. visual search tasks).
does not work touch-screens, joysticks or other directional responses
DMDX can record naming responses to disk for later analysis (though ? movement artefacts)
4. How does DMDX work?DMDX experiments are constructed in two parts
Item FilesThese are simple rich text files (.rtf) that contain a sequence of instructions telling DMDX:
1) What stimuli to present to subjects and when
2) When to start measuring response times
3) What response to expect (yes/no)
4) When to wait for a trigger from the scanner
Stimulus FilesThese are files that contain the stimuli that you want DMDX to display
1) Speech Files (.wav)
2) Picture Files (.bmp)
NB Written words are typed directly in the item file
5. What's in an item file?Item files start with a header line setting parameters for how the experiment will be run. After the header lines will be item lines indicating what stimuli to present, when to measure a response from, what response to expect, etc.
Header lines:a) Information about how to set up the machine that is running the experiment
what video mode to useb) Default settings for stimulus presentation
what device(s) to use in measuring responses
whether to wait for a scanner trigger before every item or only before some itemsc) Default settings for recording responses:
how long to display each stimulus for
how long to wait between items
what background and foreground colour to use
whether to randomise the order of presentation
how long to use as a ‘time-out’ for responsesAn example header line is shown below with keywords marked as being of type (a), (b) or (c).
how much detail to record about responses
whether to give feedback about correct/incorrect response
<vm 1024,768,768,16,0> <id PIO12> <id
<cr> <fd 17> <d 169> <dbc 255255255> <dwc 0>
<t 2500> <rcot> <azk> <nfb>
The item lines shown below will present written words successively on the screen. Each item line includes information on:
what response to expect (yes/no)- 1 * "TALKED" /;
when to start the RT clock
what stimuli to present on the screen
- 2 * "THINKING" /;
- 3 * "JUMPS" /;
+ 4 * "LEAPING" /;
0 <remark - wait here for trigger from scanner> ;
- 5 * "FDDFFFD" /;
- 6 * "MMSSMMM" /;
+ 7 * "SSMMMSSS" /;
DMDX will pause at items numbered 0 and wait for a trigger from the scanner before continuing. You will need to test your experiment to ensure that the preceding items finish before the trigger arrives from the scanner.
The item lines below come from an experiment in which an auditory word is played followed by a picture being presented on the screen. Participants are expected to respond indicating whether the word and picture are the same or different. Frames marked <wav 2> will play a sound file (in both channels). Frames marked <bmp> will display a bitmap picture file. So for the first item below, the files cat.wav and dog.bmp would need to be in the directory with the item file.
- 1 <wav 2> "cat" / * <bmp> "dog" /;
+ 2 <wav 2> "elephant" / * <bmp> "elephant" /;
- 3 <wav 2> "truck" / * <bmp> "submarine" /;
+ 4 <wav 2> "scissors” / * <bmp> "scissors" /;
Multiple frames can be combined on a single item line. A good rule of thumb is to combine frames so that there is one response expected for each item line in the file.
For more information on header lines and item lines, see Mike Ford's DMDX tutorial.
Last updated: 29/11/99