History of AFNI updates  

|
February 25, 2003 03:16PM

Hello Joe:

Christmas is a long way off. And Santa Claus is still very tired. However,
one of his elves sent along the following script, which purports to implement
Bob's suggestion. I think it can be easily modified for your applications.

Suppose that the fMRI data, consisting of multiple runs for a single subject,
is contained in files myData.Run01+orig, myData.Run02+orig, ..., myData.Run07+
orig. Also, suppose that the datasets each have 20 slices. Then the following
script can be used to analyze the data, without concatenating the datasets:

-------------------------------------------------------------------------------
#!/bin/csh

# Loop over individual slices
foreach sl ( `count -dig 2 0 19` )

# Loop over runs to be concatenated
foreach run ( `count -dig 2 1 7` )

# Extract one slice from 3d+time dataset myData.Run??+orig
3dZcutup -prefix mySlice.Run${run} -keep $sl $sl myData.Run${run}+orig
end

# Concatenate same slice from different runs
3dTcat -prefix mySlice mySlice.Run??+orig.HEAD

# Remove individual run slices
/bin/rm -f mySlice.Run*

# Analyze this concatenated slice with 3dDeconvolve
3dDeconvolve \
-input mySlice+orig -concat myCat.1D -polort 1 -num_stimts 1 \
-stim_file 1 myStim.1D -stim_maxlag 1 10 -stim_label 1 "myStim" \
-rmsmin 1.0 -progress 1000 \
-fout -nobout -bucket myStats.Slice${sl}

# Remove concatenated slice
/bin/rm -f mySlice*

end

# Assemble individual slice output into final dataset
3dZcat -prefix myStats myStats.Slice??+orig.HEAD

# Remove individual slice output
/bin/rm -f myStats.Slice*

-------------------------------------------------------------------------------

Note that the "-concat" option is used to tell 3dDeconvolve where the separate
runs are "glued" together. Also, since separate baseline parameters are
calculated for each of the runs, the "-nobout" option is used to suppress
output of the baseline coefficient sub-bricks (to save space).

Since Santa's elves are known to be mischievous, be sure to double check
the script.

Doug Ward
Subject Author Posted

3dDeconvolve, Concatenation, and File Sizes > 2 GB

joe sala February 25, 2003 08:33AM

Re: 3dDeconvolve, Concatenation, and File Sizes > 2 GB

bob cox February 25, 2003 08:52AM

Re: 3dDeconvolve, Concatenation, and File Sizes > 2 GB

joe sala February 25, 2003 09:17AM

Re: 3dDeconvolve, Concatenation, and File Sizes > 2 GB

B. Douglas Ward February 25, 2003 03:16PM

Re: 3dDeconvolve, Concatenation, and File Sizes > 2 GB

joe February 25, 2003 09:26PM

Re: 3dDeconvolve, Concatenation, and File Sizes > 2 GB

Craig Stark March 26, 2003 09:35AM