Configure mkanalysis-sess
The first step in the first-level analysis is to configure analyses and contrasts. This step describes what preprocessing stages should have been run as well as the parameters needed to construct a design matrix (no data are analyzed yet). This is done with mkanalysis-sess.
A good way to make it clear how you are configuring your analysis is to declare important parameters as shell environment variables, and then use them when calling mkanalysis-sess:
SMOOTHING=4; #FWHM smoothing kernel; rule of thumb is 2 x VoxelSize REFEVENTDUR=0.8; #How long are the events? TR=2.047; #What is the TR NCONDITIONS=3; #How many conditions in the par files SURFACE=fsaverage; #generally valid options are 'self' or 'fsaverage' HEMIS=( lh rh ); #for automatically looping over both hemispheres PARFILE=LDT.par; #What's the name of the .par files in your bold/ directories? ANROOT="LDT.sm" #base name for the analysis directories
for hemi in "${HEMIS[@]}" do mkanalysis-sess \ -fsd bold \ -surface ${SURFACE} ${hemi} \ -fwhm ${SMOOTHING} \ -event-related \ -paradigm ${PARFILE} \ -nconditions ${NCONDITIONS} \ -timewindow 24 \ -spmhrf 2 \ -polyfit 2 \ -mcextreg \ -TR ${TR} \ -refeventdur ${REFEVENTDUR} \ -analysis ${ANROOT}${SMOOTHING}.${hemi} \ -per-run -force done
The above code could be saved as a script in your ~/bin directory (e.g., mkanalysis.sh) and modified as required for different datasets or parametric choices.
This step creates analysis directories in your $SUBJECTS_DIR containing single files that contain all the information needed for the next step.
Note that there is also a directive to skip volumes, however it doesn't seem to do what we expect it to, and so we just drop those volumes from the data entirely, and modify the event onsets to account for the dropped volumes.