AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
November 08, 2012 03:35PM
Hi there,

I am having trouble with the make_random_timing.py program. When I run the following script, I have no problems:

set num_stim = 2
set num_runs = 3
set pre_rest = 6 # min rest before first stim (for magnet steady state)
set post_rest = 12 # min rest after last stim (for trailing BOLD response)
set min_rest = 1 # minimum rest after each stimulus
set tr = 2.0 # used in 3dDeconvolve, if not make_random_timing.py
set stim_durs = "1.0"
set stim_reps = "96 32"
set run_lengths = "338 338 338"
set labels = "go stop"
set max_consec = "3 0"
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

echo "here1"
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 \
#-max_consec 3 0 \
-pre_stim_rest $pre_rest -post_stim_rest $post_rest \
-min_rest $min_rest \
-stim_labels $labels \
-seed $seed \
-tr $tr \
-show_timing_stats \
-save_3dd_cmd cmd.3dd.$iter \
>& out.mrt.$iter
echo "here2"
tcsh cmd.3dd.$iter >& out.3dD.$iter

# save the sum of the 3 LC values
set nums = ( `awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter}` )

# make a quick ccalc command
set sstr = $nums[1]
foreach num ( $nums[2-] )
set sstr = "$sstr + $num"
end
set num_sum = `ccalc -expr "$sstr"`

echo -n "$num_sum = $sstr : " >> $LCfile
echo "iteration $iter, seed $seed" >> $LCfile

echo -n "$iter"
end


When I uncomment -max_consec, I get the following output and the program dies.

** removing output directory, stim_results ...
++ creating output directory, stim_results ...
iteration (of 100): 0000here1
here2
nums: Subscript out of range.

Am I doing something wrong with the "max_consec" option?

Thank you for your help!
Kristina
Subject Author Posted

make_random_timing.py

Kristina November 08, 2012 03:35PM

Re: make_random_timing.py

rick reynolds November 08, 2012 10:26PM

Re: make_random_timing.py

Kristina November 13, 2012 10:18AM

Re: make_random_timing.py

rick reynolds November 14, 2012 02:35PM

Re: make_random_timing.py

Gabe Castillo November 09, 2012 02:28PM

Re: make_random_timing.py

rick reynolds November 10, 2012 02:21AM

Re: make_random_timing.py

maria October 03, 2015 04:28PM

Re: make_random_timing.py

rick reynolds October 03, 2015 09:10PM

Re: make_random_timing.py

maria October 03, 2015 09:53PM

Re: make_random_timing.py

rick reynolds October 03, 2015 11:41PM

Re: make_random_timing.py

maria October 04, 2015 02:21AM

Re: make_random_timing.py

rick reynolds October 04, 2015 10:35PM