help > .cfg file for batch processing with ART
Showing 1-1 of 1 posts
Dec 15, 2017 02:12 PM | Kathleen Hupfeld - University of Florida
.cfg file for batch processing with ART
Hi all,
I wanted to speed up processing with ART (i.e., not use the GUI). I edited the example .cfg file. This works fine. However, right now, I still need to edit the "session 1 image" and "session 2 image" to include the full path to the image for each person, and I cannot figure out how to shorten this step.
Each person's file name starts with their subject number (e.g., 1062) and ends with "005a001.nii" for the first run and "007a001.nii" for the second run, but the middle portion of the file name is different for each person / time point.
I could not figure out how to either: create a loop to make a .cfg for each person that would automatically include the correct path to each file
or at a minimum, I could not figure out how to get the Linux wildcard (*) to abbreviate the file names; e.g., when I typed 1062*005a001.nii or *005a001, the file was not found. Being able to use some wildcard character would at least save me from needing to copy in the full path to the file for each person... (e.g., I could still individually create a .cfg file for each person / time point, but would only need to change the subject number and time point (e.g., 1062\01\) part of the path for each new .cfg file and not need to change anything else)
Any help or advice for speeding up ART processing by using .cfg files or otherwise would be greatly appreciated!
Best,
Kathleen
I wanted to speed up processing with ART (i.e., not use the GUI). I edited the example .cfg file. This works fine. However, right now, I still need to edit the "session 1 image" and "session 2 image" to include the full path to the image for each person, and I cannot figure out how to shorten this step.
Each person's file name starts with their subject number (e.g., 1062) and ends with "005a001.nii" for the first run and "007a001.nii" for the second run, but the middle portion of the file name is different for each person / time point.
I could not figure out how to either: create a loop to make a .cfg for each person that would automatically include the correct path to each file
or at a minimum, I could not figure out how to get the Linux wildcard (*) to abbreviate the file names; e.g., when I typed 1062*005a001.nii or *005a001, the file was not found. Being able to use some wildcard character would at least save me from needing to copy in the full path to the file for each person... (e.g., I could still individually create a .cfg file for each person / time point, but would only need to change the subject number and time point (e.g., 1062\01\) part of the path for each new .cfg file and not need to change anything else)
Any help or advice for speeding up ART processing by using .cfg files or otherwise would be greatly appreciated!
Best,
Kathleen
#########################################################################################################################
sessions: 2 # number of sessions
global_mean: 1 # global mean type (1: Standard 2: User-defined mask)
global_threshold: 9.0 # thresholds for outlier detection
motion_threshold: 3.0 # the default is 2.0 mm
motion_file_type: 0 # motion file type (0: SPM .txt file 1: FSL .par file 2:Siemens .txt file)
motion_fname_from_image_fname: 0 # 1/0: derive motion filename from data filename
#spm_file: ./2back/2bmodel/SPM.mat # location of SPM.mat file (comment this line if you do not wish to estimate number of outliers per condition)
image_dir: M:\flight\02_Nifti\ # functional and movement data folders (comment these lines if functional/movement filenames below contain full path information)
motion_dir: M:\flight\02_Nifti\
end
#########################################################################################################################
sessions: 2 # number of sessions
global_mean: 1 # global mean type (1: Standard 2: User-defined mask)
global_threshold: 9.0 # thresholds for outlier detection
motion_threshold: 3.0 # the default is 2.0 mm
motion_file_type: 0 # motion file type (0: SPM .txt file 1: FSL .par file 2:Siemens .txt file)
motion_fname_from_image_fname: 0 # 1/0: derive motion filename from data filename
#spm_file: ./2back/2bmodel/SPM.mat # location of SPM.mat file (comment this line if you do not wish to estimate number of outliers per condition)
image_dir: M:\flight\02_Nifti\ # functional and movement data folders (comment these lines if functional/movement filenames below contain full path information)
motion_dir: M:\flight\02_Nifti\
end
#########################################################################################################################
# Functional data file(s) for each
session; example use:
# session 1 image file01.img file02.img file03.img file04.img file05.img file06.img # selects specific .img files
# session 1 image file??.img # selects multiple .img files (?? refers to two-digit numbers with zero-padding to the left)
# session 1 image file.nii # selects single 4-d .nii file
# session 1 image file01.img file02.img file03.img file04.img file05.img file06.img # selects specific .img files
# session 1 image file??.img # selects multiple .img files (?? refers to two-digit numbers with zero-padding to the left)
# session 1 image file.nii # selects single 4-d .nii file
session 1 image
1062\02\combined_L_R\wra1062_02_281920382_294182_MRMRI_BRAIN_AND_STEM0003815663383966ep2dboldmoco66As005a001.nii
session 2 image 1062\02\combined_L_R\wra1062_02_219201038_294139_MRMRI_BRAIN_AND_STEM0002914829193766ep2dboldmoco66As007a001.nii
session 2 image 1062\02\combined_L_R\wra1062_02_219201038_294139_MRMRI_BRAIN_AND_STEM0002914829193766ep2dboldmoco66As007a001.nii
# Movement file for each session (comment
if motion_fname_from_image_fname is set to 1)
#session 1 motion 1062\02\04_VEMP\combined_L_R\rp_a1062_02_281920382_294182_MRMRI_BRAIN_AND_STEM0003815663383966ep2dboldmoco66As005a001.txt
#session 2 motion 1062\01\04_VEMP\combined_L_R\rp_a1062_02_219201038_294139_MRMRI_BRAIN_AND_STEM0002914829193766ep2dboldmoco66As007a001.txt
#session 1 motion 1062\02\04_VEMP\combined_L_R\rp_a1062_02_281920382_294182_MRMRI_BRAIN_AND_STEM0003815663383966ep2dboldmoco66As005a001.txt
#session 2 motion 1062\01\04_VEMP\combined_L_R\rp_a1062_02_219201038_294139_MRMRI_BRAIN_AND_STEM0002914829193766ep2dboldmoco66As007a001.txt
end