table of contents
LIPSIA     trial averages of fMRI time courses
vtrialaverage
A trial average of an fMRI time course is computed by time shifting all trials or events of the same type such that the onset times are 0 for all trials or events, and then taking averages.

Trial onset times often do not coincide with data acquisition times. Therefore, data points used for computing trial averages must be interpolated. In our implementation, we use a spline interpolation. The program 'vtrialaverage' outputs the trial average to an ASCII-file that can then be processed by other programs (such as 'gnuplot' or 'SAS').

Example:

vtrialaverage -in raw.v -des design.des -addr 3 -9 10 -system talairach -condition "3 4" -type blob -zmap zmap.v -pos 3.09 -len 12 -reso 0.2 -report list.txt

In this example, an ASCII file is produced that can be visualized using some plotting tool. The plot below was produced using 'gnuplot' using the following 'gnuplot'-commands (the vertical bars indicate standard errors):

set grid
plot "list.txt" index 0 title "cond 3" w l lw 3,"" index 0 notitle w err lt 1, \
"" index 1 title "cond 4" w l lt 3 lw 3,"" index 1 notitle w err lt 3


The parameter '-addr' specifies the voxel address at which the time course is to be read. The parameter '-system' determines the coordinate system that is used for this address. In the above example, the address '3 -9 10' is given as Talairach coordinates.

The parameter '-condition' specifies the experimental conditions to be processed. In the above example, conditions 3 and 4 are processed. The condition IDs correspond to the IDs specified in the design file. Condition IDs should be larger than 0. The option '-type' determines whether the time course should be read in one voxel only, or whether time courses in neighbouring pixels should also be included in the average. The following options are possible:

The parameter '-zmap' is optional for the types single,6adj, 26adj. If present, it is used to exclude voxels below the given thresholds. The parameter '-zmap' is required for the type blob. The voxel specified in '-addr is used regardless of its z-value.

The parameter '-reso' specifies the temporal resolution of the trial average. It must be given in seconds. In the above example, the temporal resolution of the resulting trial average is 0.2 seconds.

The parameter '-len' determines the length of the trial average in seconds. In the above example, 12 seconds after trial onset are computed. The parameter '-psc' determines whether the output should be given as 'percent signal change'. If set to '-psc false' then absolute values are given.

trial averages of fitted response

Replacing the raw data file by the associated beta-file (e.g. output of 'vcolorglm'), 'vtrialaverage' computes trial averages of the fitted response. Example:

vtrialaverage -in betafile.v -des design.des -addr 25 28 30 -cond "1"

sample report file:

A sample report file is attached below. The first column contains the time points at which the trial average is computed. The second column contains the average values, the third column contains the standard error.

#
# design file: des.txt
# number of voxels in ROI: 27
# voxel address: 12 22 25
#
# number of trials in this condition: 57
# experimental condition: 3
#----------------------------------
#     sec         mean      std-err
#..................................
    0.00000    -0.00370     0.03976
    0.25000    -0.01287     0.03936
    0.50000    -0.02061     0.03902
    0.75000    -0.02738     0.03898
    1.00000    -0.03188     0.03918
    1.25000    -0.03256     0.03931
    1.50000    -0.02913     0.03955
    1.75000    -0.02158     0.03994
           
Parameters of vtrialaverage:
-help
Prints usage information.
-in
Input file. Default: (none)
-design
Design file. Required.
-report
Report file. Default:
-minval
minval. Default: 0
-addr
voxel address. Required.
-type single | 6adj | 26adj | blob
How to average across adjacent voxels. Default: single
-mask
File containing ROI mask. Default:
-zmap
Zmap file. Default:
-pos
Positive threshold for zmap. Default: 3.09
-neg
Negative threshold for zmap. Default: -1000
-cond
Experimental conditions. Required.
-system voxel | talairach
coordinate system. Default: voxel
-resolution
temporal resolution in secs. Default: 0.25
-length
trial length in seconds. Default: 15
-psc [ true | false ]
Whether to report percent signal change. Default: true


Max Planck Institute for Human Cognitive and Brain Sciences. Further Information: lipsia@cbs.mpg.de
Copyright © 2007 Max Planck Institute for Human Cognitive and Brain Sciences. All rights reserved.