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:
- single: the timecourse is taken in one single voxel.
- 6adj: the timecourse is taken in the specified voxel plus in its 6 adjacent neighbours. If a zmap is given, then only voxels above the thresholds ('-pos','-neg') are used. The voxel specified in '-addr' is always used regardless of its z-value.
- 26adj: the timecourse is taken in the specified voxel plus in its 26 adjacent neighbours. If a zmap is given, then only voxels above the thresholds ('-pos','-neg') are used. The voxel specified in '-addr' is always used regardless of its z-value.
- blob: the timecourse is taken in the specified voxel and in all its adjacent voxels whose z-values in the zmap are either above the '-pos'-threshold or below the '-neg'-threshold. A zmap is required for this option (parameter '-zmap').
- blob: if a mask file containing ROIs is given (generated using 'vmaskedit' or 'vledit') then the voxel inside the ROI that includes the given voxel address is used.
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.