analysis.event_related¶
Module: analysis.event_related
¶
Inheritance diagram for nitime.analysis.event_related
:
EventRelatedAnalyzer
¶

class
nitime.analysis.event_related.
EventRelatedAnalyzer
(time_series, events, len_et, zscore=False, correct_baseline=False, offset=0)¶ Bases:
nitime.descriptors.ResetMixin
Analyzer object for reversecorrelation/eventrelated analysis.
Note: right now, this class assumes the input time series is only twodimensional. If your input data is something like (nchannels,nsubjects, …) with more dimensions, things are likely to break in hard to understand ways.

__init__
(time_series, events, len_et, zscore=False, correct_baseline=False, offset=0)¶ Parameters: time_series : a timeseries object
A timeseries with data on which the eventrelated analysis proceeds
events_time_series : a TimeSeries object or an Events object
The events which occurred in tandem with the timeseries in the EventRelatedAnalyzer. This object’s data has to have the same dimensions as the data in the EventRelatedAnalyzer object. In each sample in the timeseries, there is an integer, which denotes the kind of event which occurred at that time. In timebins in which no event occurred, a 0 should be entered. The data in this time series object needs to have the same dimensionality as the data in the data timeseries
len_et : int
The expected length of the eventtriggered quantity (in the same timeunits as the events are represented (presumably number of TRs, for fMRI data). For example, the size of the block dedicated in the fir_matrix to each type of event
zscore : a flag to return the result in zscore (where relevant)
correct_baseline : a flag to correct the baseline according to the first
point in the eventtriggered average (where possible) :
offset : the offset of the beginning of the eventrelated timeseries,
relative to the event occurrence :

FIR
()¶ Calculate the FIR eventrelated estimated of the HRFs for different kinds of events
Returns: A timeseries object, shape[:2] are dimensions corresponding to the to :
shape[:2] of the EventRelatedAnalyzer data, shape[2] corresponds to :
the different kinds of events used (ordered according to the sorted :
order of the unique components in the events timeseries). shape[1] :
corresponds to time, and has length = len_et :

FIR_estimate
()¶ Calculate back the LTI estimate of the timeseries, from FIR

et_data
()¶ The eventtriggered data (all occurrences).
This gets the timeseries corresponding to the inidividual event occurrences. Returns a list of lists of timeseries. The first dimension is the different channels in the original timeseries data and the second dimension is each type of event in the event time series
The timeseries itself has the first diemnsion of the data being the specific occurrence, with time 0 locked to the that occurrence of the event and the last dimension is time.e
This complicated structure is so that it can deal with situations where each channel has different events and different events have different # of occurrences

eta
()¶ The eventtriggered average activity.

ets
()¶ The eventtriggered standard error of the mean

xcorr_eta
()¶ Compute the normalized crosscorrelation estimate of the HRFs for different kinds of events
Returns: A timeseries object, shape[:2] are dimensions corresponding to the to :
shape[:2] of the EventRelatedAnalyzer data, shape[2] corresponds to :
the different kinds of events used (ordered according to the sorted :
order of the unique components in the events timeseries). shape[1] :
corresponds to time, and has length = len_et (xcorr looks both back :
and forward for half of this length) :
