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
 3 column file for button press?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

n/a
deleted

6 Posts

Posted - Oct 06 2011 :  11:29:13 AM  Show Profile  Reply with Quote
hi all,

I'm trying to create an EV for the button press in an experiment, and I'm not sure how to include that in the three-column files xcede_extract_schedules.pl makes. I need some way of combining the onset time (in seconds) and the reaction time (in msec) into one event. Right now, the only solution I can think of is to create events for those separately and then combine them. Has anyone found a better solution to this?

Thanks!

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Oct 06 2011 :  11:41:50 AM  Show Profile  Reply with Quote
Generally what people do is to find a query that matches the stimuli (STIMQUERY) and a query that matches the responses (RESPQUERY) and then create a new events file that has the responses (that occur within MAXRESPTIME seconds of the stimulus) included in the stimulus like so:
bxh_eventresp --stimquery STIMQUERY --respquery RESPQUERY --maxresptime MAXRESPTIME eventsfile.xml neweventsfile.xml
Then you can use xcede_extract_schedules.pl on that new events file. If that doesn't make sense, you can send me examples of your current events files and I can create a command for you.
Go to Top of Page

n/a
deleted

6 Posts

Posted - Oct 06 2011 :  12:19:00 PM  Show Profile  Reply with Quote
that makes sense. thanks!
Go to Top of Page

ch186
New Member

20 Posts

Posted - Oct 06 2011 :  1:43:01 PM  Show Profile  Reply with Quote
Syam, the problem that we are having is that the button press isn't an actual event that occurs in the GPF output files. The button press event occurs after seeing an image but isn't recorded as a stimulus. So in the GPF and in the XML, we have:
- <event type="i" units="sec">
<onset>340.001</onset>
<value name="code">13</value>
<duration>1.5</duration>
<value name="response">2</value>
<value name="reactionTime">1173</value>
<value name="memory">match</value>
</event>

We want to have in our XML files an event that is for button press that would occur in this case at 340+1.173 seconds (different for every image shown). Is there a way to create this event or would it be easier to try to manipulate the 3-column file that is already created for the stimulus?
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Oct 06 2011 :  2:36:35 PM  Show Profile  Reply with Quote
hey courtney ...

I think what you are looking for doesn't exist inside of the bxh-tools. You actually want to query your events, then from the results create a completely new event and perform the onset+RT operation.

GPF actually associates a response with the event it occurred within ... some others create the response a separate event. If you email me one of your behavioral XMLs i can probably write you a script to produce the XML with the separate events.
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Oct 06 2011 :  2:47:57 PM  Show Profile  Reply with Quote
I see, if you're trying to go that way (extract the embedded response into a separate event), that's a different story.

You could try something like this:
bxh_event2table --query='type="i"' eventfile.xml
where you would replace the query 'type="i"' with whatever you are using to match your stimuli, and then this creates a tab-separated file that has all the values for each event as columns; once you've found out which columns have the onset and response time, you can pipe it to awk:
bxh_event2table --query='type="i"' eventfile.xml | awk '{print $1 + $8, 0, 1}'
where $1 and $8 specify the first and eighth columns (you will need to change this depending on your particular data). The 0 and 1 afterwards are the duration and weight you want to put in the second and third columns of the timing file. Let me know if that won't work for you.

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.44 seconds. Snitz Forums 2000