Hi Michael,
That is a tcsh script, as specified by the first line,
but you are executing it using bash (by 'sourcing'
the script?).
It is preferable to make it executable:
chmod a+x @stim_analyze
and to run it via:
./@stim_analyze
If you don't like chmod, the use tcsh:
tcsh @stim_analyze
- rick