Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Analysis Software Support
 FSL block analysis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dichter
BIAC Faculty

190 Posts

Posted - Jul 29 2007 :  4:19:17 PM  Show Profile  Visit Dichter's Homepage  Reply with Quote
Sorry if this was covered elsewhere.... I am trying to analyze block design data with fsl, so the trick is to get the 3-column behavioral file to reflect the duration of the blocks appropriately (e.g., my blocks are 30 seconds long, but the output of xcede_extract_schedules.pl indicates they were one second long because I coded my Cigal presentation files to indicate only the onset of a block).

Is there an option in xcede_extract_schedules.pl to indicate lengths of events? Thanks.

Gabriel S. Dichter, PhD
UNC Departments of Psychiatry & Psychology
http://www.can.unc.edu/

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Jul 30 2007 :  09:42:08 AM  Show Profile  Reply with Quote
Sorry there isn't. You could either edit the XML files or FSL files manually, or if all your blocks are the same length, you could try
the following command:
awk '{$2=30; print}' old_timing_file.txt >new_timing_file.txt
That will change the second column in all lines to 30. (Don't forget to then use the "new" timing file)

(Edited to change third column to second column)

Edited by - syam.gadde on Aug 01 2007 08:18:59 AM
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Jul 30 2007 :  11:36:05 AM  Show Profile  Reply with Quote
another option would be to add a block specific field when you convert your data to XML and have duration set to 30secs.

just add an extra line to your parsing file:

event $type=@block $onset=Time:msec $duration=@30000:msec

you can add more fields if you match other info

$MATCHEQUAL='Label'@'emotional' blockname='Label'
-- here i had a column "Label" and i am matching where the fields are labeled "emotional"
Go to Top of Page

Dichter
BIAC Faculty

190 Posts

Posted - Jul 30 2007 :  12:39:48 PM  Show Profile  Visit Dichter's Homepage  Reply with Quote
Thanks, guys. Syam's fix did the trick given that all blocks are the same length. It looks like, however, the original file is tab-delimited and the new one is space-delimited. Don't know if that will cause a problem down the pipeline...

Gabriel S. Dichter, PhD
UNC Departments of Psychiatry & Psychology
http://www.can.unc.edu/
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Jul 30 2007 :  12:48:28 PM  Show Profile  Reply with Quote
We've used examples of both (space and tab delimited) and it worked fine.

This doesn't apply for showplay2xml, but if you're converting event data using eprime2xml, presentation2xml or eventstable2xml, Chris' suggestion is a good one (to nip it in the bud from the beginning).
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - Jul 30 2007 :  1:14:31 PM  Show Profile  Reply with Quote
The latest version of CIGAL can also create 3 column FSL files for you automatically if you want. It's a fairly simple change to the stimulus input file. Let me know if you're interested in learning more.

Jim
Go to Top of Page

Dichter
BIAC Faculty

190 Posts

Posted - Jul 30 2007 :  1:15:43 PM  Show Profile  Visit Dichter's Homepage  Reply with Quote
Yes, please!

Gabriel S. Dichter, PhD
UNC Departments of Psychiatry & Psychology
http://www.can.unc.edu/
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - Jul 30 2007 :  1:32:14 PM  Show Profile  Reply with Quote
If you put ID codes on your stimuli then you can generate FSL 3-column "schedule" files by adding a 'fslscheds' string list of condition names and which ID codes go with that condition. For example, putting the following line into the top section of a CIGAL input file will create 2 FSL timing files ("sch_encode.txt" and "sch_retrieval.txt"):

fslscheds = {
encode 6 66 7 77
retrieval 104 204 144 244
}

The sch_encode.txt file will list the timing of "encode" conditions consisting of all stimuli that have ID codes of 6, 66, 7, or 77. A run of multiple stimuli with any combination of those codes willl be lumped together as a single timing block. If you only code the onset of a condition the procedure is slightly different.

Using this approach involves putting sensible ID codes on the stimuli, but once it's set up in the input files the appropriate output files are generated automatically.

Jim

Jim
Go to Top of Page

Dichter
BIAC Faculty

190 Posts

Posted - Jul 31 2007 :  10:42:50 PM  Show Profile  Visit Dichter's Homepage  Reply with Quote
Sorry: just confirming that its the *second* column (not the third) of the 3-column file that reflects duration: http://www.fmrib.ox.ac.uk/fslfaq/

Gabriel S. Dichter, PhD
UNC Departments of Psychiatry & Psychology
http://www.can.unc.edu/
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Aug 01 2007 :  08:17:59 AM  Show Profile  Reply with Quote
Oops. Sorry about that. You can replace the $3 with $2 in my script.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.34 seconds. Snitz Forums 2000