DOC PREVIEW
LECTURE NOTES

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Event_DesignAnaly_FlankerAging.pdfEventfMRI_AllScriptsDesign: give_me_stimuli.sTS1_analy.1D, TS2_analy .1D, TS3_analy.1D, TS4_analy.1DTSall_analy.1D, concat.1DE-Prime Programmingregister s: register many image files to AFNI formatCollect Dataanalyze_ts_fwhm4.sregister.s: register many image files to AFNI format.3dTshift: slice timing adjustment3dvolreg: motion correction3dTcat: concatenate all fMRI data together3dmerge: spatial blurring3dmerge: spatial blurringmask generation: identify brain region with 3dcalc or 3dAutomaskLink design matrix (TSall_analy.1D, concat.1D)3dDeconvolve (deconv.s): Compare fMRI image data with design matrixdecon_TS (the “bucket”)PerSigCh.s: calculate % signal changeFLY_group_ANOVA2_analyze.s: group analysis from all subjectsMonteCarlo moreIterfwhm4 sl P5103 (3d l d 3d ) l l iMonteCarlo_moreIterfwhm4.s (AlphaSim)gen_clusterP5103.s (3dclust and 3dmerge): cluster analysisFinal results#!/bin/tcsh # To design the experiment # David C. Zhu, Spring, 2007 # 4 runs # experiment parameters set ts = 164 # length of timeseries set stim = 3 # number of input stimuli set num_on = 32 # time points ON per stimulus type (between 0 and $ts/3) # execution parameters set iterations = 200 # number of iterations set seed_1 = 1628873 # initial random seed for 1st run set seed_2 = 2734891 # initial random seed for 2nd run set seed_3 = 5734792 # initial random seed for 3nd run set seed_4 = 6724890 # initial random seed for 4nd run set outdir = stim_TSall_results set LCfile = $outdir/LC_sums rm -f -R $outdir # ------------------------------------------------------------ # make sure $outdir exists if ( ! -d $outdir ) then mkdir $outdir if ( $status ) then echo "failure, cannot create output directory, $outdir" exit endif endif # create empty LC file echo -n "" > $LCfile echo -n "iteration: 000" # ------------------------------------------------------------ # run the test many timesforeach iter (`count -digits 3 1 $iterations`) # make some other random seed for Run 1 @ seed_1 = $seed_1 + 1 # create random order stim files RSFgen -nt ${ts} -num_stimts ${stim} -nreps 1 ${num_on} -nreps 2 ${num_on} -nreps 3 ${num_on} -seed ${seed_1} \ -prefix RSF.stim.run1.${iter}. >& /dev/null # make some other random seed for Run 2 @ seed_2 = $seed_2 + 1 # create random order stim files RSFgen -nt ${ts} -num_stimts ${stim} -nreps 1 ${num_on} -nreps 2 ${num_on} -nreps 3 ${num_on} -seed ${seed_2} \ -prefix RSF.stim.run2.${iter}. >& /dev/null # make some other random seed for Run 3 @ seed_3 = $seed_3 + 1 # create random order stim files RSFgen -nt ${ts} -num_stimts ${stim} -nreps 1 ${num_on} -nreps 2 ${num_on} -nreps 3 ${num_on} -seed ${seed_3} \ -prefix RSF.stim.run3.${iter}. >& /dev/null # make some other random seed for Run 4 @ seed_4 = $seed_4 + 1 # create random order stim filesRSFgen -nt ${ts} -num_stimts ${stim} -nreps 1 ${num_on} -nreps 2 ${num_on} -nreps 3 ${num_on} -seed ${seed_4} \ -prefix RSF.stim.run4.${iter}. >& /dev/null cat RSF.stim.run1.${iter}.1.1D RSF.stim.run2.${iter}.1.1D RSF.stim.run3.${iter}.1.1D RSF.stim.run4.${iter}.1.1D > RSF.stim.all.${iter}.1.1D cat RSF.stim.run1.${iter}.2.1D RSF.stim.run2.${iter}.2.1D RSF.stim.run3.${iter}.2.1D RSF.stim.run4.${iter}.2.1D > RSF.stim.all.${iter}.2.1D cat RSF.stim.run1.${iter}.3.1D RSF.stim.run2.${iter}.3.1D RSF.stim.run3.${iter}.3.1D RSF.stim.run4.${iter}.3.1D > RSF.stim.all.${iter}.3.1D # check deconvolution 3dDeconvolve \ -nodata -quiet -nfirst 0 -nlast 655 -polort 2 \ -num_stimts 3 -TR_times 2.5 -concat concat.1D \ -stim_file 1 "RSF.stim.all.${iter}.1.1D" -stim_label 1 'Cong' -stim_minlag 1 0 -stim_maxlag 1 6 \ -stim_file 2 "RSF.stim.all.${iter}.2.1D" -stim_label 2 'ICong' -stim_minlag 2 0 -stim_maxlag 2 6 \ -stim_file 3 "RSF.stim.all.${iter}.3.1D" -stim_label 3 'Neutral' -stim_minlag 3 0 -stim_maxlag 3 6 \ -num_glt 3 \ -gltsym 'SYM: +Cong[0..6] -Neutral[0..6]' -glt_label 1 'Cong-Neutral' \ -gltsym 'SYM: +ICong[0..6] -Neutral[0..6]' -glt_label 2 'ICong-Neutral' \ -gltsym 'SYM: +ICong[0..6] -Cong[0..6]' -glt_label 3 'ICong-Cong' \ >& 3dD.nodata.${iter} # save the sum of the 3 LC values set nums = ( `awk -F= '/LC/ {print $2 * 10000}' 3dD.nodata.${iter}` ) @ num_sum = $nums[1] + $nums[2] + $nums[3] echo -n "$num_sum = $nums[1] + $nums[2] + $nums[3] : " >> $LCfile echo "iteration $iter, seed $seed_1 $seed_2 $seed_3 $seed_4" >> $LCfile mv RSF* $outdir mv 3dD.nodata* $outdir echo -n "\b\b\b$iter" end echo "" echo "done, results are in '$outdir', LC sums are in '$LCfile'" echo consider the command: "sort $LCfile | head -1"#!/bin/csh -f /# The overall script to analyze each subject data # David C. Zhu, Spring 2007 ln -s ../AnalyScripts/register.s . register.s cd Afni_analy ### 3dTshift -prefix ts_TS1+orig TS_1+orig 3dTshift -prefix ts_TS2+orig TS_2+orig 3dTshift -prefix ts_TS3+orig TS_3+orig 3dTshift -prefix ts_TS4+orig TS_4+orig # Register Time Series TS1 3dvolreg -dfile mot_tempTS1 -base 'ts_TS1+orig[1]' -prefix reg_TS1 ts_TS1+orig # Register Time Series TS2 3dvolreg -dfile mot_tempTS2 -base 'ts_TS1+orig[1]' -prefix reg_TS2 ts_TS2+orig # Register Time Series TS3 3dvolreg -dfile mot_tempTS3 -base 'ts_TS1+orig[1]' -prefix reg_TS3 ts_TS3+orig # Register Time Series TS4 3dvolreg -dfile mot_tempTS4 -base 'ts_TS1+orig[1]' -prefix reg_TS4 ts_TS4+orig #Concatenate each group of Registered Time Series 3dTcat -session . -prefix reg_cat_TSall_before_blur reg_TS1+orig reg_TS2+orig reg_TS3+orig reg_TS4+orig #=============================================================== # Try to blurring it a bit first (Gaussian filter with a FHWM of 4 mm) #=============================================================== 3dmerge -1blur_fwhm 4 -doall -prefix reg_cat_TSall reg_cat_TSall_before_blur+orig#Put the motion plots in one file cat mot_tempTS* > motion_plotTSall #Plot Rotations and Translations #1dplot -volreg -xlabel 'Time Point' 'motion_plotTS1[1-6]' #1dplot -volreg -xlabel 'Time Point' 'motion_plotTS2[1-6]' #1dplot -volreg -xlabel 'Time Point' 'motion_plotTS3[1-6]' #1dplot -volreg -xlabel 'Time Point' 'motion_plotTS4[1-6]' #Create mask to only use Brain Voxels for Deconvolution 3dcalc -prefix mask800 -a 'ts_TS1+orig[1]' -expr ‘astep(a,800)’ 3dAutomask -prefix mask_auto reg_cat_TSall+orig


LECTURE NOTES

Download LECTURE NOTES
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?