Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 Analysis Software Support
 bxh_eventstats event query language

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
petty Posted - Dec 09 2005 : 10:03:18 AM
Here's a short description of the query language syntax: (courtesy of syam)

QUERY: Would match any event where:
CONDITION The CONDITION is true
(QUERY) The QUERY is true
QUERY1 & QUERY2 Both QUERYs are true
QUERY1 | QUERY2 Either QUERY is true

CONDITION: Would match any event where:
param param is > 0
param(>numval) param is greater than numval
param(<numval) param is greater than numval
param(VALUELIST) param equals any value in VALUELIST
param > numval
param >= numval
param < numval
param <= numval
param == numval_or_strval
param != numval_or_strval
[params can be on the right-hand side of these expressions too]

VALUELIST:
VALRANGE
VALRANGE,VALUELIST

VALRANGE: (e.g. "1,3,4-9,22" or "red,green,orange")
strval
numval
numval1-numval2 equivalent to numval1,numval1+1,...,numval2

Definitions:
param any recognized state variable name
strval a string surrounded by quotes (single or double)
numval a number

Examples:
QUERY DESCRIPTION
shape=='square' Match all events whose 'shape' param is 'square'

onset >= 30
Match all events which happened starting at or after time 30

shape=='square' & onset>=30
Match all 'square' events starting at or after time 30

code==4 & color!='red'
Match all events with code 4 whose color is not red

code(2,4,6-10)
Match events whose code is 2,4,6,7,8,9,or 10

actual_response==2
Match events which have a actual_response (perhaps a
button number) param with value 2

actual_response==correct_response
If your events have both the actual_response and
correct_response encoded as parameters, this will
match only correct responses.
15   L A T E S T    R E P L I E S    (Newest First)
syam.gadde Posted - Oct 30 2007 : 1:48:20 PM
A script called "3column2xml" is now available on golgi. Use it with the --help option to get a help message.
dvsmith Posted - Oct 29 2007 : 5:25:03 PM
Thanks, Syam. A script would be useful for anyone using PsychToolbox (or something else with non-standard output) for stimulus presentation since the output files aren't in a standard format. The 3 column EV files are, however, standardized for almost everyone.

I'll see if I can convert my 3-column files into the format you suggest.

-David

syam.gadde Posted - Oct 29 2007 : 5:07:35 PM
We have ways to go from the XML to the 3-column timing files, but no easy way to go directly from the 3-column to XML. I'm guessing you have multiple 3-column timing files, each representing one condition. If you were able to get this data into a tab-separated or comma-separated file that looked something like this:

NAME,START,DURATION,WEIGHT
fixation,0,10,1
face,10,2.5,1
face,15,2.5,1
face,20,2.5,1
ask,25,2.5,1
probe,30,2.5,1

etc.

then you could use eventstable2xml (run it with the --help option to get a help message).

It actually wouldn't be too hard to put together a script that did this automatically, I suppose. I'll see what I can do.
petty Posted - Oct 29 2007 : 4:53:41 PM
*** sorry i totally misread your question ***
dvsmith Posted - Oct 29 2007 : 4:43:38 PM
Hi,

I'm new to event_stats and I was wondering if anyone has a script for converting 3-column EV files into the .xml files that event_stats needs. I see there are several other functions for taking standard output from Presentation, Cigal, and E-Prime and generating the .xml files.

Thanks,
David
syam.gadde Posted - Jun 29 2006 : 3:12:24 PM
quote:
Originally posted by tankersley
One remaining question:
Why can batches successfully create data files for individual conditions
if the template is 12 but ptsbefore/after are 13? Does it just not
process the 13th data point?



What do you mean by "successful"?

Epoch averages and related data (_avg, _std, _n, etc.) do not require the template, so those data will be successfully generated regardless of the template. The template is only required to create _cor and _tmap files. If the template has the wrong number of timepoints, you shouldn't get any _cor or _tmap files, either for individual conditions or for comparisons. Do you get _cor or _tmap files for individual conditions when the template has the wrong number of timepoints?
tankersley Posted - Jun 29 2006 : 2:18:19 PM
Okay; I specified 13 TRs in ptsbefore and ptsafter, so I'll add a timepoint to the template.

One remaining question:
Why can batches successfully create data files for individual conditions if the template is 12 but ptsbefore/after are 13? Does it just not process the 13th data point?

Thanks so much!

Dharol
syam.gadde Posted - Jun 29 2006 : 1:48:07 PM
The epoch averages for ptsbefore=4 and ptsafter=8 would have 13
time points. 8 + 1 + 4 (includes the timepoint of the event
itself). The template is only used after creating the averages.
tankersley Posted - Jun 29 2006 : 1:25:11 PM
Okay; The problem was that I have

ptsbefore = 4
ptsafter = 8

SO I'll add a time point to the template.
One more question:
Does this mean that all the files batches successfully created for individual conditions only have the first 12 TRs of data?

Thanks,

Dharol
syam.gadde Posted - Jun 29 2006 : 10:49:56 AM
Does it actually run bxh_correlate successfully for some?
bxh_correlate is only run on the individual conditions.
The comparison happens afterwards with bxh_ttest.

What do you specify for ptsbefore and ptsafter?
You have 12 points in your template, so ptsbefore + ptsafter + 1
should equal 12.
tankersley Posted - Jun 29 2006 : 10:39:58 AM
Oh -- It's having a problem when it tries to run tcompare. It says:

Number of time points in data and template must match!
Error running /usr/local/bin/bxh_correlate.

My template is:
--template 0,0,0,0.00022185,0.039984446,0.50459248,0.971434037,0.838679245,0.47536268,0.178599023,0.062807994,0 --

It works for running single conditions, so I'm not sure why it doesn't work for the comparison?

Thanks,
Dharol

syam.gadde Posted - Jun 29 2006 : 10:06:01 AM
quote:
Originally posted by tankersley

When running batches in Eventstats, after the job is finished I get this error message:
Error running /usr/local/bin/bxh_correlate.



Does it give any errors before that? In the _LOG.txt file?
tankersley Posted - Jun 29 2006 : 09:53:31 AM
When running batches in Eventstats, after the job is finished I get this error message:
Error running /usr/local/bin/bxh_correlate.


Does anyone know what it means?

Thanks :)

Dharol
tankersley Posted - Jun 29 2006 : 09:52:06 AM
Does anyone know what the following error message means:

Error running /usr/local/bin/bxh_correlate.

Thanks :)

Dharol
syam.gadde Posted - May 29 2006 : 6:18:44 PM
Sitting down with Dharol, the permissions problems were due to opening the script eventscreate in WordPad on Windows, and when it saved it removed executable permission. To restore executable permission to a file, do:

chmod +x MYSCRIPT


However, that was not the only problem. Editing a golgi script in Wordpad is a bad idea, because it will use Windows line-ending characters which are not supported by shells on golgi. Most UNIX systems have programs called dos2unix and unix2dos that will convert the newline conventions from one to the other, but that did not exist on golgi, so I've provided bare-bones versions that you can use:

dos2unix MYFILE


will "fix" any script you may have accidentally edited using WordPad or other Windows editor.

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