## This is a sample bxh_eventstats options file.
## To use it, you need to specify it on the command line, e.g.:
##   bxh_eventstats --optsfromfile myOptionFile.txt [other arguments...]
## All lines beginning with # are comments (like this line).
## For more help, try "bxh_eventstats --help"

## This specifies the query language.  Valid languages are 'XPath' and
## 'event'.  'event' is a simpler language, 'XPath' is more powerful.
querylanguage event

## These specify the beginning and starting points of the analysis.
## Time points before and after will be ignored.  Default is to include
## all points.
# startpt 0
# endpt 100 # example!

## How many time points before/after the event will be considered as
## part of the epoch?  These are both in TRs.  If both are 0, then
## the event time point itself is the only point in the epoch.
## The number of time points in the epoch is ptsbefore + ptsafter + 1.
## Usually both should be non-negative.
## These options (or secsbefore and secsafter) are required.
ptsbefore 3
ptsafter  8

## Alternatively, you can specify the epoch duration in seconds.
## These options (or ptsbefore and ptsafter) are required.
# secsbefore 3
# secsafter  8

## Which points (relative to the event) should be considered part of
## the average baseline?  These are both offsets (in TRs) from the event.
## If both are 0, then the event time point is the baseline.
## The number of time points in the baseline is
## (-1)*basestartoffset + baseendoffset + 1.
## Usually basestartoffset should be non-positive and baseendoffset
## should be non-negative.
## These options are required.
basestartoffset -3
baseendoffset    0

## If specified, this will create a brain mask based on the first
## image file using the 'localmin' method of bxh_brainmask.
createbrainmask

## Alternatively you can specify a brain mask explicitly with the
## maskfile option:
# maskfile /my/mask/file.bxh

## If specified, this will force all events to occur on the closest TR.
## This will decrease computation time, but make the results less
## accurate.
# nointerp

## If the input image files do not specify a TR, or you would otherwise
## like to override the value, use this option.  Please use image file
## formats that specify a TR!
# forcetr 3.0 # example!

#######################
# FREQUENCY FILTERING #
#######################

## If you would like to do any frequency filtering of each voxel across
## time, use the following options.

## This option, if present, adds temporal filtering using a Chebyshev
## filter, and chooses which type of filtering to use.  Valid choices are
## 'lowpass', 'highpass', 'bandpass, or 'bandstop'.  Each filter is
## parameterized by one or more instances of "tfilterperiod".  'lowpass'
## or 'highpass' require one tfilterperiod option, specifying the stop
## or start frequency respectively.  'bandpass' or 'bandstop' require two
## "tfilterperiod" options, specifying the start and stop frequencies, in
## any order (larger period/smaller frequency is assumed to be start
## frequency for 'bandpass' and stop frequency for 'bandstop').
#tfiltertype bandpass  # example!

## This option specifies the frequency parameters for the filter in terms
## of the period (i.e. 1/frequency) in seconds per cycle.  May be
## specified once for 'lowpass' and 'highpass' filter types, twice for
## 'bandpass' and 'bandstop' filter types, and must be greater than 0.
## Must be greater than 2*TR.
#tfilterperiod 7   # example!
#tfilterperiod 100 # example!

## This option specifies the percent ripple for the Chebyshev filter.  If
## 0 [zero], which is the default, then the filter is a Butterworth
## filter.
#tfilterripple 0  # example!

## Order of the temporal filter.  Default is 6.
#tfilterorder 6

###########
# QUERIES #
###########

# Each query represents a "bin".
# Each query may have the following options:
#  querylabel - specifies a text label for this bin
#  query - specifies a query that matches events that should fall into this bin
#  queryfilter - if specified, filters the events matching the main query
#  queryepochexclude - if specified, filters the events by epoch
# There must be at least one "query" option.
# The others are optional, but if they exist, they must be specified for
# every query.  i.e. if you specify "queryepochexclude" for one query,
# you must specify it for all queries.  Empty strings for queryfilter
# and queryepochexclude do what you expect -- they have no effect.

# Example queries:
# Find all events whose 'code' value is 1, but exclude those events
# whose epochs include a volume whose mean intensity is more than 3
# standard deviations from the mean (assumes you have a QA event file
# that has this information for the given run).
querylabel Rest
query "code==1"
queryfilter ""
queryepochexclude "volmean_z_indiv > 3"

# Find all events whose 'shape' value is 'square', but only those who
# happened simultaneously with a blue background.  Exclude those events
# whose epochs include a volume whose mean intensity is more than 3
# standard deviations from the mean (assumes you have a QA event file
# that has this information for the given run).
querylabel SquareBlueBack
query "shape=='square'"
queryfilter "background=='blue'"
queryepochexclude "volmean_z_indiv > 3"


###############
# CORRELATION #
###############

# The hemodynamic curve template to correlate against for each query/bin.
# r- and t-statistic volumes will be generated for each query/bin.
template 0,0,0,0,0.321601345,0.890377726,1,0.566742211,0.272476597,0.082058953,0.014452811,0

# Bin comparisons, if any, you wish to make.  Specify two query labels
# separated by a dash '-'.  The labels themselves may not contain dashes,
# of course.
tcompare DevTone-StdTone

