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  

|
October 04, 2015 02:21AM
Hi Rick,

Yes, you raise good points and I will take them into account. I failed to mention earlier that I wanted to add @ seed = $seed +1 and 3dDeconvolve to my command. If I run the following shorter command (see first script below), then I see the LC[0] norm. std. dev number going through 100 iterations while the process is running in the terminal. However, I have trouble integrating the iterations into a larger script that spits out the numbers for LC into a file. I would like that LC file so that I can evaluate which iteration has the lowest norm. std. dev. I hope that makes more sense now.

The following command works (further below I pasted the command that does not work):

set seed = 1234567
foreach iter (`count -digits 3 1 100`)

make_random_timing.py -num_runs 2 -run_time 240 -num_stim 2 -num_reps 15 -show_timing_stats -stim_dur 2 -max_consec 3 -min_rest 2.0 -save_3dd_cmd sample.3dd.command.${iter} -stim_labels first second -t_gran 4.0 -make_3dd_contrasts -verb 4 -seed ${seed} -prefix stim_times.${iter}.

@ seed = $seed + 1

3dDeconvolve \
-nodata 120 4.000 \
-polort 2 \
-concat '1D: 0 60' \
-num_stimts 2 \
-stim_times 1 stim_times.${iter}._01_first.1D 'BLOCK(2,1)' \
-stim_label 1 first \
-stim_times 2 stim_times.${iter}._02_second.1D 'BLOCK(2,1)' \
-stim_label 2 second \
-num_glt 1 \
-gltsym 'SYM: first -second' -glt_label 1 first-second \
-x1D X.xmat.${iter}.1D.

end

Integrating the above portion into the command below does not work (I pasted the error message to the very end):
set iterations = 100
set seed = 1234567
set outdir = stim_results
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

foreach iter (`count -digits 3 1 $iterations`)

# create empty LC file
echo -n "" > $LCfile

echo -n "iteration: 000"

make_random_timing.py -num_runs 2 -run_time 240 -num_stim 2 -num_reps 15 -show_timing_stats -stim_dur 2 -max_consec 3 -min_rest 2.0 -save_3dd_cmd sample.3dd.command.${iter} -stim_labels first second -t_gran 4.0 -make_3dd_contrasts -verb 4 -seed ${seed} -prefix stim_times.${iter} >& out.mrt.$iter
tcsh cmd.3dd.$iter >& out.3dD.$iter

@ seed = $seed + 1

3dDeconvolve \
-nodata 120 4.000 \
-polort 2 \
-concat '1D: 0 60' \
-num_stimts 2 \
-stim_times 1 stim_times.${iter}._01_first.1D 'BLOCK(2,1)' \
-stim_label 1 first \
-stim_times 2 stim_times.${iter}._02_second.1D 'BLOCK(2,1)' \
-stim_label 2 second \
-num_glt 1 \
-gltsym 'SYM: first -second' -glt_label 1 first-second \
-x1D X.xmat.${iter}.1D.

# save the sum of the 2 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

#: Command not found.
iteration: 000** FATAL ERROR: '-stim_times 1' can't read file 'stim_times.001._01_first.1D' [nopt=12]
** Program compile date = Sep 25 2015
#: Command not found.
#: Command not found.
nums: Subscript out of range.
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