The object of this exercise is to extract the timing information
and use it to make a FEAT custom EV file (3 column).
- An example stimulus file
stim1.txt contains information about
stimulus timings for an event related experiment. The format
Event No. Condition Code Onset Time Comment
View this file to see what it contains and how it is formatted.
- Extract lines for a single condition
grep extract all the lines
in the file that contain
- Extract the timing column
awk extract just the timing column from these
Save the timing values as a variable.
- Creating the additional columns
Append two columns (fixed duration of 30.0 and value of 1.0) after the
timing number for each line to get a valid 3 column format for FEAT.
Hint: use a
for loop over the values
Save the results in a file called
- Processing the other condition(s)
Repeat the above for condition
- Changing the TR (Advanced)
If the time information was in TRs (volume number) rather
than seconds, use
bc to convert this to seconds given a
TR of 3.5 seconds.
Look here for the basic cheat or the fancy cheat.