To execute the shell script @stim_analyze, it is enough to 'cd' to
the directory containing the script and run it:

        cd howto/ht03_stim

        ./@stim_analyze

# ----------------------------------------------------------------------

The script follows this general outline:

	- initialize some script variables
	- initialize and test the main output file and directory
	- repeatedly:
	    - run RSFgen to generate stimulus timing files
	    - run waver to generate ideal wave files (from the stim files)
	    - run 3dDeconvolve to evaluate the stimulus timings
	- inform the user of the results

# ----------------------------------------------------------------------

The first iteration of the main loop will execute the following five
commands.  As practice, run them by hand from the ht03_stim directory.
It is enough to cut and paste them from a browser window, though it may
be worth doing them one by one, and noting what happens each time.


	RSFgen	    -nt 300				\
		    -num_stimts 3			\
		    -nreps 1 50				\
		    -nreps 2 50				\
		    -nreps 3 50				\
		    -seed 1234568			\
		    -prefix RSF.stim.001.


	waver -GAM -dt 1.0 -input RSF.stim.001.1.1D > wav.hrf.001.1.1D
	waver -GAM -dt 1.0 -input RSF.stim.001.2.1D > wav.hrf.001.2.1D
	waver -GAM -dt 1.0 -input RSF.stim.001.3.1D > wav.hrf.001.3.1D


	3dDeconvolve					\
		    -nodata				\
		    -nfirst 4				\
		    -nlast 299				\
		    -polort 1				\
		    -num_stimts 3			\
		    -stim_file 1 wav.hrf.001.1.1D	\
		    -stim_label 1 stim_A		\
		    -stim_file 2 wav.hrf.001.2.1D	\
		    -stim_label 2 stim_B		\
		    -stim_file 3 wav.hrf.001.3.1D	\
		    -stim_label 3 stim_C		\
		    -glt 1 contrasts/contrast_AB	\
		    -glt 1 contrasts/contrast_AC	\
		    -glt 1 contrasts/contrast_BC


For an explanation of the commands from an AFNI perspective see: AFNI_howto
For an explanation of the commands from a  Unix perspective see: Unix help

# ----------------------------------------------------------------------

After you execute the above commands, note that you now have some 1D files
in the current directory.  Once you have looked through them, they can be
removed.


    If you can't get help here.  Please, get help somewhere.