History of AFNI updates  

|
November 06, 2017 09:27PM
Hi Rick,

Thanks for the reminder to bump up forgotten posts. I always thought that failures to respond meant you all were not willing to continue working on things. It is good to know that is not the case.

For my code, I added your suggestion of -rand_post_stim_rest no. I pasted in the relevant parts of the code below in the section titled "THIS IS THE make_stim_times code:".

Also, I am working on modifying the 3dDeconvolve command that is generated by the make_stim_times program (see the 3dDeconvolve call at bottom of this message). For this one, I removed the condition associated with the Baseline condition from the auto-generated code. I also added the new GLT according to your recommendation. The glt should get the average response to all the conditions of interest (labels 1 through label 8) relative to baseline.

Can you take a look at this code to see if it is doing what I think it is supposed to be doing?

Also, directly below is the output from the 3dDeconvolve call. How do I figure out if I need to add more baseline trials or if I can remove some and save some experiment time?

Regards,
Christine

3dDeconvolve: AFNI version=AFNI_17.0.15 (Sep 4 2009) [64-bit]
++ Authored by: B. Douglas Ward, et al.
++ using TR=0.75 seconds for -stim_times and -nodata
++ using NT=4500 time points for -nodata
++ Input polort=5; Longest run=675.0 s; Recommended minimum polort=5 ++ OK ++
++ -stim_times using TR=0.75 s for stimulus timing conversion
++ -stim_times using TR=0.75 s for any -iresp output datasets
++ [you can alter the -iresp TR via the -TR_times option]
++ ** -stim_times NOTE ** guessing GLOBAL times if 1 time per line; LOCAL otherwise
++ ** GUESSED ** -stim_times 1 using LOCAL times
++ ** GUESSED ** -stim_times 2 using LOCAL times
++ ** GUESSED ** -stim_times 3 using LOCAL times
++ ** GUESSED ** -stim_times 4 using LOCAL times
++ ** GUESSED ** -stim_times 5 using LOCAL times
++ ** GUESSED ** -stim_times 6 using LOCAL times
++ ** GUESSED ** -stim_times 7 using LOCAL times
++ ** GUESSED ** -stim_times 8 using LOCAL times
------------------------------------------------------------
GLT matrix from 'SYM: +.125*label1 +.125*label2 +.125*label3 +.125*label4 +.125*label5 +.125*label6 +.125*label7 +.125*label8':
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125

++ Number of time points: 4500 (no censoring)
+ Number of parameters: 38 [30 baseline ; 8 signal]
++ Wrote matrix values to file X.xmat.1D
++ ----- Signal+Baseline matrix condition [X] (4500x38): 2.18301 ++ VERY GOOD ++
++ ----- Signal-only matrix condition [X] (4500x8): 1.0306 ++ VERY GOOD ++
++ ----- Baseline-only matrix condition [X] (4500x30): 1.00605 ++ VERY GOOD ++
++ ----- polort-only matrix condition [X] (4500x30): 1.00605 ++ VERY GOOD ++
++ Wrote matrix values to file X_XtXinv.xmat.1D
++ +++++ Matrix inverse average error = 3.61072e-16 ++ VERY GOOD ++
++ Matrix setup time = 0.61 s

Stimulus: label1
h[ 0] norm. std. dev. = 0.0686

Stimulus: label2
h[ 0] norm. std. dev. = 0.0706

Stimulus: label3
h[ 0] norm. std. dev. = 0.0688

Stimulus: label4
h[ 0] norm. std. dev. = 0.0701

Stimulus: label5
h[ 0] norm. std. dev. = 0.0701

Stimulus: label6
h[ 0] norm. std. dev. = 0.0703

Stimulus: label7
h[ 0] norm. std. dev. = 0.0688

Stimulus: label8
h[ 0] norm. std. dev. = 0.0679

General Linear Test: Task_vs_Baseline
LC[0] norm. std. dev. = 0.0448





THIS IS THE make_stim_times code:
set num_stim = 9
set num_runs = 5
set pre_rest = 12 # min rest before first stim (for magnet steady state)
set post_rest = 9 # min rest after last stim (for trailing BOLD response)
set min_rest = 0 # minimum rest after each stimulus
set tr = 0.75 # used in 3dDeconvolve, if not make_random_timing.py
set stim_durs = (15.75 15.75 15.75 15.75 15.75 15.75 15.75 15.75 3)
set stim_reps = (4 4 4 4 4 4 4 4 50)
set run_lengths = 675
set labels = "label1 label2 label3 label4 label5 label6 label7 label8 baseline"

# ---------------------------------------------------------------------------
# execution parameters
set iterations = 100 # number of iterations to compare
set seed = 1234567 # initial random seed
set outdir = stim_results # directory that all results are under
set LCfile = NSD_sums # file to store norm. std. dev. sums in

# set pattern = LC # search pattern for LC[0], say
set pattern = 'norm. std.' # search pattern for normalized stdev vals

make_random_timing.py -num_stim $num_stim -stim_dur $stim_durs \
-num_runs $num_runs -run_time $run_lengths \
-num_reps $stim_reps -prefix stimes.$iter \
-pre_stim_rest $pre_rest -post_stim_rest $post_rest \
-min_rest $min_rest \
-rand_post_stim_rest no \
-stim_labels $labels \
-seed $seed \
-tr_locked \
-tr $tr \
-show_timing_stats \
-save_3dd_cmd cmd.3dd.$iter \
>& out.mrt.$iter




THIS IS THE 3dDeconvolve code:
3dDeconvolve \
-nodata 4500 0.750 \
-polort 5 \
-concat '1D: 0 900 1800 2700 3600' \
-num_stimts 8 \
-stim_times 1 stimes.0044_01_label1.1D 'BLOCK(15.75,1)' \
-stim_label 1 label1 \
-stim_times 2 stimes.0044_02_label2.1D 'BLOCK(15.75,1)' \
-stim_label 2 label2 \
-stim_times 3 stimes.0044_03_label3.1D 'BLOCK(15.75,1)' \
-stim_label 3 label3 \
-stim_times 4 stimes.0044_04_label4.1D 'BLOCK(15.75,1)' \
-stim_label 4 label4 \
-stim_times 5 stimes.0044_05_label5.1D 'BLOCK(15.75,1)' \
-stim_label 5 label5 \
-stim_times 6 stimes.0044_06_label6.1D 'BLOCK(15.75,1)' \
-stim_label 6 label6 \
-stim_times 7 stimes.0044_07_label7.1D 'BLOCK(15.75,1)' \
-stim_label 7 label7 \
-stim_times 8 stimes.0044_08_label8.1D 'BLOCK(15.75,1)' \
-stim_label 8 label8 \
-gltsym 'SYM: +.125*label1 +.125*label2 +.125*label3 +.125*label4 +.125*label5 +.125*label6 +.125*label7 +.125*label8' \
-glt_label 1 "Task_vs_Baseline" \
-x1D X.xmat.1D
Subject Author Posted

'active' baseline task and make_random_timing.py

Christine Smith October 16, 2017 07:21PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds October 18, 2017 09:28AM

Re: 'active' baseline task and make_random_timing.py

Christine Smith October 18, 2017 05:30PM

Re: 'active' baseline task and make_random_timing.py

Christine Smith October 25, 2017 05:03PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds October 25, 2017 06:29PM

Re: 'active' baseline task and make_random_timing.py

Christine Smith October 26, 2017 03:15PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds November 03, 2017 11:41AM

Re: 'active' baseline task and make_random_timing.py

Christine Smith November 06, 2017 09:27PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds November 09, 2017 10:43AM

Re: 'active' baseline task and make_random_timing.py

Christine Smith November 20, 2017 08:24PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds November 21, 2017 11:25AM

Re: 'active' baseline task and make_random_timing.py

rick reynolds November 22, 2017 08:29AM

Re: 'active' baseline task and make_random_timing.py

Christine Smith November 29, 2017 03:19PM

Re: 'active' baseline task and make_random_timing.py

rick reynolds November 29, 2017 03:46PM