Hi Rick,
Since I used 3 PCs for csf and sagittal sinus each, along with anaticor for white matter etc within afni_proc.py, getting all of the “noise” might be a bit difficult as I am not sure I can just add the files together (since some have censored timepoints etc). Would the easiest way to calculate the noise residuals be the following for resting state:
- Use 3dTproject to censor pb04 (blurred file) so that it has the same timepoints as errts.fanaticor. This file would represent my signal+noise total file. Then I would substract errts.fanaticor (bold like resting state signal) from pb04.censor.
The result should represent all of the “noise” of csf, sagittal sinus, motion, white matter etc rolled into one file. I would then warp this file to MNI space (same grid as my stats) so that any warping smoothness is added into the estimation. I would then run 3dFWHMx -acf -detrend on this warped noise file to get my estimation of the acf parameters. Finally I would use an average of all subjects to estimate my acf input into 3dClustSim to estimate my clustersize.
Below is the code generated which is run…maybe you can specify which file from there would work if my option above does not seem correct.
- On a separate note I noticed my 3dTproject cenmode was zero instead of kill from afni_proc.py. Do you think I should update this or leave as is? I am not sure which is considered the best option currently.
Code Run from AFNI
make ROI PCs and uncensor (zero-pad) : FSvent
3dpc -mask follow_ROI_FSvent+orig -pcsave 3 -prefix roi_pc_01_FSvent
rm.det_pcin_rall+orig"[$ktrs]"
1d_tool.py -censor_fill_parent censor_${subj}_combined_2.1D
-infile roi_pc_01_FSvent_vec.1D -write roi_pc_01_FSvent_noc.1D
make ROI PCs and uncensor (zero-pad) : FSsinus
3dpc -mask follow_ROI_FSsinus+orig -pcsave 3 -prefix roi_pc_02_FSsinus
rm.det_pcin_rall+orig"[$ktrs]"
1d_tool.py -censor_fill_parent censor_${subj}_combined_2.1D
-infile roi_pc_02_FSsinus_vec.1D -write roi_pc_02_FSsinus_noc.1D
------------------------------
run the regression analysis
3dDeconvolve -input pb04.$subj.r*.blur+orig.HEAD
-mask full_mask.$subj+orig
-censor censor_${subj}_combined_2.1D
-ortvec bandpass_rall.1D bandpass
-ortvec roi_pc_01_FSvent_noc.1D ROI.PC.FSvent
-ortvec roi_pc_02_FSsinus_noc.1D ROI.PC.FSsinus
-polort 3 -float
-num_stimts 12
-stim_file 1 motion_demean.1D’[0]’ -stim_base 1 -stim_label 1 roll_01
-stim_file 2 motion_demean.1D’[1]’ -stim_base 2 -stim_label 2 pitch_01
-stim_file 3 motion_demean.1D’[2]’ -stim_base 3 -stim_label 3 yaw_01
-stim_file 4 motion_demean.1D’[3]’ -stim_base 4 -stim_label 4 dS_01
-stim_file 5 motion_demean.1D’[4]’ -stim_base 5 -stim_label 5 dL_01
-stim_file 6 motion_demean.1D’[5]’ -stim_base 6 -stim_label 6 dP_01
-stim_file 7 motion_deriv.1D’[0]’ -stim_base 7 -stim_label 7 roll_02
-stim_file 8 motion_deriv.1D’[1]’ -stim_base 8 -stim_label 8 pitch_02
-stim_file 9 motion_deriv.1D’[2]’ -stim_base 9 -stim_label 9 yaw_02
-stim_file 10 motion_deriv.1D’[3]’ -stim_base 10 -stim_label 10 dS_02
-stim_file 11 motion_deriv.1D’[4]’ -stim_base 11 -stim_label 11 dL_02
-stim_file 12 motion_deriv.1D’[5]’ -stim_base 12 -stim_label 12 dP_02
-fout -tout -x1D X.xmat.1D -xjpeg X.jpg
-x1D_uncensored X.nocensor.xmat.1D
-fitts fitts.$subj
-errts errts.${subj}
-x1D_stop
-bucket stats.$subj
– use 3dTproject to project out regression matrix –
3dTproject -polort 0 -input pb04.$subj.r*.blur+orig.HEAD
-mask full_mask.$subj+orig
-censor censor_${subj}_combined_2.1D -cenmode ZERO
-ort X.nocensor.xmat.1D -prefix errts.${subj}.tproject
if 3dDeconvolve fails, terminate the script
if ( $status != 0 ) then
echo ‘---------------------------------------’
echo ‘** 3dDeconvolve error, failing…’
echo ’ (consider the file 3dDeconvolve.err)’
exit
endif
display any large pairwise correlations from the X-matrix
1d_tool.py -show_cormat_warnings -infile X.xmat.1D |& tee out.cormat_warn.txt
create an all_runs dataset to match the fitts, errts, etc.
3dTcat -prefix all_runs.$subj pb04.$subj.r*.blur+orig.HEAD
--------------------------------------------------
generate fast ANATICOR result: errts.$subj.fanaticor+orig
--------------------------------------------------
fast ANATICOR: generate local FSWe time series averages
create catenated volreg dataset
3dTcat -prefix rm.all_runs.volreg pb03.$subj.r*.volreg+orig.HEAD
mask white matter before blurring
3dcalc -a rm.all_runs.volreg+orig -b follow_ROI_FSWe+orig
-expr “a*bool(b)” -datum float -prefix rm.all_runs.volreg.mask
generate ANATICOR voxelwise regressors via blur
3dmerge -1blur_fwhm 30 -doall -prefix Local_FSWe_rall
rm.all_runs.volreg.mask+orig
– use 3dTproject to project out regression matrix –
3dTproject -polort 0 -input pb04.$subj.r*.blur+orig.HEAD
-mask full_mask.$subj+orig
-censor censor_${subj}_combined_2.1D -cenmode ZERO
-dsort Local_FSWe_rall+orig
-ort X.nocensor.xmat.1D -prefix errts.$subj.fanaticor
Best,
Ajay