Print

Print


I grappled with this same problem.  My solution was to substitute special
keywords in a template fsf file:

e.g, The capitalized values are my keywords: SUBJECT,  RUN_DIR, RUN_SUBJECT

# Output directory
set fmri(outputdir) "/Exps/Data/plante/SUBJECT/Func/RUN_DIR/RUN_SUBJECT"
# TR(s)
set fmri(tr) 2.6
===================
Then I have a script file to copy the template file and do substitutions
with sed:
===================
cp /usr/local/tools/REF/plante_design.fsf design.fsf

if [ $# -lt 2 ]
then
    echo "Usage: $0 <Run number> design.fsf"
    echo "Example: $0  1 /usr/local/tools/REF/plante_design.fsf"
    exit 1
fi

RUN_NUM=$1
RUN_DIR=Run${RUN_NUM}
RUN=run${RUN_NUM}

# for each variable do a global substitution
cat design.fsf | sed -e "s/SUBJECT/${SUBJECT}/g" >> design2.fsf
cat design2.fsf | sed -e "s/RUN_DIR/${RUN_DIR}/g" >> design3.fsf
cat design3.fsf | sed -e "s/RUN/${RUN}/g" >> design4.fsf
rm design.fsf design2.fsf design3.fsf
mv design4.fsf design.fsf
=================
It works.

-Dianne


On Thu, Sep 29, 2011 at 5:27 PM, Benjamin A Philip <[log in to unmask]>wrote:

>  Is there any way to get a FSL .fsf file to read a $ variable set
>  outside the file?  Specifically, I'd love to let my FEAT parameters call
>  $FSLDIR, to make sure they can run (and find the standard brain files)
>  on any computer.  Obviously, I have tried setting the path names to
>  $FSLDIR/restofpath and the running the .fsf file from the command line,
>  but that leads to FSL looking for a directory starting with "$FSLDIR"
>  rather than the contents thereof.
>
>  Thanks,
>
> --
>  Benjamin Philip, Ph.D.
>  Postdoctoral Fellow - Freylab
>  1227 Department of Psychology
>  University of Oregon
>  Eugene, OR 97403-1227
>  (541) 346-4953
>  [log in to unmask]
>  Office: 307 Straub Hall
>
>


-- 
Dianne Patterson, Ph.D.
Research Scientist
[log in to unmask] <[log in to unmask]>
University of Arizona
Speech and Hearing Science 314
1131 E 2nd Street, Building #71
(Just East of Harvill)
621-9877
==============
If you write me (expecting an answer) and I don't respond within a
day, then the UAConnect System has probably lost your message.
You can always write me at [log in to unmask],
because gmail actually works.