Index TableOfContents




["selxavg-sess"] –sf <subjectfilename> –df <srchdirfile> –analysis <sem_assoc> [options]


Required Arguments:

-analysis <analysisname>

name of functional analysis that you created under the analysis flag in [""]

-sf <sessidfile>

text file list of subjects

-df <srchdirfile>

text file list of directories where subjects can be found

-d <srchdir>

use instead of –df if specifying only one dir

Optional Arguments


save residual error to analysis/eres/eRRR


save signal estimate to analysis/signal/sRRR


save estimate of SNR to analysis/estsnr

-umask umask

set unix file permission mask [not necessary, but can use 002]


print version and exit



contains the estimated hemodynamic response at each voxel, along with the standard deviation of the residual error


contains a map of the mean value at each voxel

This will create a subdirectory with the same name as your “analysisname” under the bold directory in subjects directory. There will be two volumes in this directory, one with stem “h” and one with stem “h-offset”. These are where the hemodynamic averages are stored, i.e.:

There is also a text file called h.dat with information about the parameters used during the analysis. Future processing of this analysis will create other subdirectories under “analysisname”.


General Description

["selxavg-sess"] computes the average signal intensity maps for each condition for each individual subject. This program separately analyzes the data in each session indicated in the sessid file, then computes the average signal intensity maps for each condition. This average data can be further processed on an individual basis and/or can be used for group analyses.

Resolving Common Errors


Run 6/6, 6.50608 Excluding 0 Points:??? Error using ==> +Matrix dimensions must agree.Error in =>/space/lyon/1/home/inverse/freesurfer_alpha/fsfast/toolbox/fast_selxavg.m On line 512 ==>SumESSMtx = SumESSMtx + ESSMtx;>> ??? Undefined function or variable 'r'.>> quiting matlab ERROR: fast_selxavg()failed ERROR(/autofs/space/thor_009/users/kk/filter_fMRI/0112_071004): selxavg failed


All runs do not contain the same number of timepoints. This may be due to a scanner error. The affected run should be excluded from averaging


there are $ncondact non-null conditions in the paradigm file. However, $ncond non-null conditions were specified when mkanalysis was run. These must be made consistent in order to run selxavg-sess.


Your par files may not have the same number of conditions as you specified in mkanalysis.


/space/lyon/1/home/inverse/freesurfer_alpha/fsfast/toolbox/fast_selxavg.m On line 323 ==> Xi = [Xpar Xdrift extregrun]; >> ??? Undefined function or variable 'r'. >> quiting matlab


Notice that the Warnings at the beginning of this error say something about integer elements. You are getting this error because your TR is not an integer. You must go to all of your subjects’ bold directory and emacs the file. Change the TR in to an integer (such as 2 or 2.0000). You must re-run mkanalysis-sess with this new TR, then try selxavg-sess again.

||Error ||


Example 1: For spherical analysis

selxavg-sess -analysis tau_sm6 -sf subjects-id -df dir

Example 2: For talairach analysis

selxavg-sess -analysis tau_sm8 -sf subjects-id -df dir

["mkanalysis"] must be run

Paradigm files placed in each bold directory



See Also




Methods Description




Reporting Bugs

Report bugs to <>


DougGreve and DaphneRobakis