selxavg3-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 mkanalysis-sess.gui

Session Arguments (required)

-sf <sessidfile>

text file list of subjects

-df <srchdirfile>

text file list of directories where subjects can be found

-s <sessid>

use instead of sf if specifying only one subject

-d <srchdir>

use instead of –df if specifying only one dir

Optional Arguments


delete analysis if session of already analyzed


only compute contrasts (estimation already done)

-c c1 <-c c2 ...>

compute contrasts c1, c2, .. (default is to compute all)


run even if no contrasts in analysis


compute FWHM of residual


do not run preprocessing


saves residuals (usually not needed)


save unwhitened residuals (usually not needed)


analyze each run separately


do not create a log file

-log logfile

specify log file explicitly


use all CPUs (default is to use one)

-outparent dir

save output to this dir instead of in session


print version and exit


This will create a subdirectory with the same name as your “analysisname” under the bold directory in subjects directory. This folder has all of the results for this analysis, including:

beta.nii - regression coefficients
rvar.nii - residual error variance
mask.nii - mask (copy of bold/masks/brain.nii)
meanfunc.nii - mean functional image
fsnr.nii - functional SNR map
X.mat - design matrix (in matlab format)
dof - text file with degrees of freedom
fwhm.dat - text file with smoothness estimate (Full-Width/Half-Max)

contrast folders: 
     Each contrast folder contains:
         ces.nii - contrast effect size (contrast matrix * regression coef)
         cesvar.nii - variance of contrast effect size
         sig.nii - significance map (-log10(p))


General Description

This program 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. This also compute contrasts for testing hypotheses based on a GeneralLinearModel (GLM), including t and F statistics, significances of those statistics, and contrast effects sizes (ces).This is the new version of stxgrinder, implicit intensity normalization, better whitening

This program performs the first-level fMRI analysis. Specify the analysis configuration with -analysis. This is the configuration created with mkanalysis-sess. The analysis should already have contrasts created (by mkcontrast-sess), though you can add contrasts afterwards.

By default, selxavg3-sess will check the preprocessing to make sure that it has been run properly (turn off with -no-preproc).

By default, it will only run the analysis on data sets that actually need to be re-run based on the time stamps of the input data. To force a re-analysis run with -force or -overwrite.

This program will construct the design matrix for each run, fit the GLM, save regression coefficients, compute contrasts and significances of contrasts. The runs are combined together so the output is the average across runs (some would call this a "second-level" analysis).

This program requires matlab or octave.

The contrast to noise ratio is measured by the contrast value (gamma) divided by the residual stddev (rstd). This value is stored in cnr.nii.



See Also





Reporting Bugs

Report bugs to <>



selxavg3-sess (last edited 2018-01-25 16:26:51 by MorganFogarty)