[Swift-commit] r3027 - SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/preprocessingDos

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Aug 3 00:07:38 CDT 2009


Author: andric
Date: 2009-08-03 00:07:38 -0500 (Mon, 03 Aug 2009)
New Revision: 3027

Added:
   SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/preprocessingDos/AFNIcleanTSruns.swift
Log:
use of 3dDeconvolve to get a cleaned time series, having included regressors for motion and white matter signal. This distributes runs rather than doing the whole time series concatenated.

Added: SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/preprocessingDos/AFNIcleanTSruns.swift
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/preprocessingDos/AFNIcleanTSruns.swift	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/preprocessingDos/AFNIcleanTSruns.swift	2009-08-03 05:07:38 UTC (rev 3027)
@@ -0,0 +1,58 @@
+#-- deconvolve cleaning up TS
+#---- doing this run by run
+type file{}
+
+type AFNI_obj{
+    file HEAD;
+    file BRIK;
+}
+
+type stims{
+    string labels[];
+    string fnames[];
+}
+
+app (AFNI_obj deconvBucketResult, AFNI_obj errtsResult) AFNI_pincheDeconvolution (AFNI_obj normalized, stims stimuli, file censor, file motionfile, file WMmask, file Ventmask, string outPrefix, string outerrtsPrefix){
+    AFNI_3dDeconvolve "-jobs" 2 "-input" @filename(normalized.BRIK) "-polort" 3 "-tshift" "-num_stimts" 8
+    "-stim_file" 1 stimuli.fnames[0]
+    "-stim_file" 2 stimuli.fnames[1]
+    "-stim_file" 3 stimuli.fnames[2]
+    "-stim_file" 4 stimuli.fnames[3]
+    "-stim_file" 5 stimuli.fnames[4]
+    "-stim_file" 6 stimuli.fnames[5]
+    "-stim_file" 7 stimuli.fnames[6]
+    "-stim_file" 8 stimuli.fnames[7]
+    "-censor" @filename(censor)
+    "-full_first" "-rout"
+    "-bucket" outPrefix
+    "-errts" outerrtsPrefix;
+}
+
+
+string declarelist[] = ["PK2"];
+int runs[] = [1:8];
+foreach subject in declarelist{
+    foreach rr in runs{
+    ## map inputs
+        file motionfile<single_file_mapper; file=@strcat("mot_",subject,"_run",rr)>;
+        file WMmask<single_file_mapper; file=@strcat("whitemask.nrmlzdPerChng.",subject,".run",rr,".1D")>;
+        file Ventmask<single_file_mapper; file=@strcat("ventmask.nrmlzdPerChng.",subject,".run",rr,".1D")>;
+        file censor<single_file_mapper; file=@strcat("mot_",subject,"_run",rr,"_censor.1D")>;
+        AFNI_obj normalized<simple_mapper; prefix=@strcat("nrmlzdPerChng.",subject,".run",rr,"+orig.")>;
+    
+        ## map outputs
+        string outPrefix = @strcat("garbage_bucketTS_",subject,"run",rr);
+        string outerrtsPrefix = @strcat("cleanTS_",subject,"run",rr);
+        AFNI_obj bucket<simple_mapper; prefix=@strcat(outPrefix,"+orig.")>;
+        AFNI_obj errts<simple_mapper; prefix=@strcat(outerrtsPrefix,"+orig.")>;
+    
+        #---- stimuli info
+        stims stimuli;
+        stimuli.labels = ["roll","pitch","yaw","dx","dy","dz","whitemask","ventmask"];
+        stimuli.fnames = [@strcat(@filename(motionfile),"[1]"), at strcat(@filename(motionfile),"[2]"), at strcat(@filename(motionfile),"[3]"),
+                        @strcat(@filename(motionfile),"[4]"), at strcat(@filename(motionfile),"[5]"), at strcat(@filename(motionfile),"[6]"),
+                        @filename(WMmask), at filename(Ventmask)];
+    
+        (bucket, errts) = AFNI_pincheDeconvolution(normalized, stimuli, censor, motionfile, WMmask, Ventmask, outPrefix, outerrtsPrefix);
+    }
+}




More information about the Swift-commit mailing list