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