Event Query Strings

An Event Query is a character string designed to identify a subset of events. For simplicity, each event can be characterized by when it occurs (onset and duration), the type of event (e.g. image, sound, text, button press, etc.), condition variables related to the event itself (e.g. stimulus name, color, size, location, etc.), as well as the status of a number of more general state variables (e.g. current block type, performance level, heart rate, etc.).

An Event Query uses an intuitive syntax for selecting events, with simple logical operators to allow different event properties to be combined in a single query. An Event Query can have any of the following forms (terms are defined below):

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 non-zero
param(>numval) param is greater than numval
param(<numval) param is less than numval
param(VALUELIST) param matches any value in VALUELIST
param(!VALUELIST) param does not match any value in VALUELIST

VALUELIST:
VALRANGE
VALRANGE,VALUELIST

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

Definitions:
param any recognized state variable name (see PARAM NAMES below)
strval a recognized variable value name (e.g. red)
numval a number


Character string names
STRVAL and PARAM names may contain letters (a-z) number characters (0-9) or the underline character (_).
Names must not begin with a number character (0-9).
Letters in names are case insensitive (e.g Color=color, red=RED).
Names should not be longer than 16 characters.

PARAM NAMES
As mentioned above, an Event can be associated with many different state variables, some of which will have predefined names (such as "onset"), whereas others will be based on user-defined names as specified in a CodeNames string.

Currently, recognized predefined parameter names are:
ONSET
DURATION
TYPE
TEXTCOLOR
SCREENCOLOR
(need to fill out this list -- fScan uses the following state names:
CPHASE - cardiac phase
CRATE - cardiac rate
RPHASE - respiratory phase
RRATE - respiratory rate
RAMPLITUDE - respiratory amplitude
RANDOM - a random variable for control comparisons

See also:
Paradigm Parameter Settings
Stimulus List
Code Tables

Back to Contents
Back to Running
Back to Introduction