Configure preproc-sess: Difference between revisions
No edit summary |
No edit summary |
||
Line 31: | Line 31: | ||
preproc-sess -per-run -fwhm 6 -surface self lhrh -fsd bold -s FS_T1_501 | preproc-sess -per-run -fwhm 6 -surface self lhrh -fsd bold -s FS_T1_501 | ||
== | == Other options == | ||
=== Slice time correction === | |||
Slice time correction adjusts the functional data to account for the fact that, when you acquire an entire 3D volume as a series of 2-D planes (slices) over the span of 1 TR (commonly 2 seconds), then the very last slice you acquire is going to be delayed 2 seconds relative to the very first slice you acquire. There is a <code>-stc</code> switch that you can provide telling Freesurfer what order the slices were acquired, which the software uses to algorithmically adjust the signals for each slice to account for the fact that they occurred earlier vs. later within that 1 TR time window. Using this switch requires you to know something about the scanner. It is prudent to check with the scanner technician to verify the slice acquisition order so that you can provide the correct value to go along with the '''-stc''' switch. | |||
Revision as of 12:13, 21 April 2016
You can preprocess multiple participants in a batch or individual participants, depending on how you invoke the preproc-sess command.
Create a subjectname file
The first thing you will need to do is create a file called subjectname
in the folders for each of the participants you will be preprocessing. This file contains only a single line, indicating the Freesurfer subjectid by which that subject is known. For example, for the subject whose data is in $SUBJECTS_DIR/FS_T1_501/, there should be a file called subjectname that contains just a single line:
FS_T1_501
If such a file does not exist, create it:
cd $SUBJECTS_DIR/FS_T1_501 echo FS_T1_501 > subjectname
Or, if you want to be fancy and not have to type out the name of the participant, you can use the output of the 'basename' linux command to generate the name of your directory, which should match your participant name:
cd $SUBJECTS_DIR/FS_T1_501 echo `basename "$PWD"` > subjectname
Using this method, the second command will always be the same for any participant.
Run preproc-sess
This command does motion correction, spatial smoothing (to reduce noise, thereby increasing the signal-to-noise ratio), and slice-time correction on your functional (BOLD) data. It can be run on a batch of participants or on individuals.
Batch processing
Batch processing requires a sessid file containing the session names (i.e., the names of all the Freesurfer folders) for all your participants. The sessid file can be called anything you wish, and is simply a plain text file with one folder name on each line. For example:
chris_subjects.txt: FS_T1_501 FS_T2_501 FS_T1_505 FS_T2_505
When doing a batch, you call using the -sf switch:
preproc-sess -sf <sessidfile> -df <srchdirfile> [options]
e.g.,
preproc-sess -sf chris_subjects.txt -surface self lhrh -fwhm 6 -per-run -fsd bold
If the -df
switch isn't provided (it doesn't seem to be mandatory) then it uses a default directory (possibly $SUBJECTS_DIR, or possibly your current working directory) to start in.
Individuals
Preprocessing individuals works pretty much the same, except you do not require a sessid file. Instead, you provide it with the name of one of the session folders, and use the -s
switch, rather than the -sf
switch:
preproc-sess -per-run -fwhm 6 -surface self lhrh -fsd bold -s FS_T1_501
Other options
Slice time correction
Slice time correction adjusts the functional data to account for the fact that, when you acquire an entire 3D volume as a series of 2-D planes (slices) over the span of 1 TR (commonly 2 seconds), then the very last slice you acquire is going to be delayed 2 seconds relative to the very first slice you acquire. There is a -stc
switch that you can provide telling Freesurfer what order the slices were acquired, which the software uses to algorithmically adjust the signals for each slice to account for the fact that they occurred earlier vs. later within that 1 TR time window. Using this switch requires you to know something about the scanner. It is prudent to check with the scanner technician to verify the slice acquisition order so that you can provide the correct value to go along with the -stc switch.