mvpa2.misc.support.Event

Inheritance diagram of Event

class mvpa2.misc.support.Event(**kwargs)

Simple class to define properties of an event.

The class is basically a dictionary. Any properties can be passed as keyword arguments to the constructor, e.g.:

>>> ev = Event(onset=12, duration=2.45)

Conventions for keys:

onset
The onset of the event in some unit.
duration
The duration of the event in the same unit as onset.
label
E.g. the condition this event is part of.
chunk
Group this event is part of (if any), e.g. experimental run.
features
Any amount of additional features of the event. This might include things like physiological measures, stimulus intensity. Must be a mutable sequence (e.g. list), if present.
Parameters :

**kwargs : dict

All keys to describe the Event to initialize its dict.

as_descrete_time(dt, storeoffset=False, offsetattr='offset')

Convert onset and duration information into descrete timepoints.

Parameters :

dt : float

Temporal distance between two timepoints in the same unit as onset and duration.

storeoffset : bool

If True, the temporal offset between original onset and descretized onset is stored as an additional item.

offsetattr : str

The name of the attribute that is used to store the computed offset in case the storeoffset is enabled.

Returns :

A copy of the original `Event` with `onset` and optionally `duration` :

replaced by their corresponding descrete timepoint. The new onset will :

correspond to the timepoint just before or exactly at the original :

onset. The new duration will be the number of timepoints covering the :

event from the computed onset timepoint till the timepoint exactly at :

the end, or just after the event. :

Note again, that the new values are expressed as #timepoint and not :

in their original unit! :

NeuroDebian

NITRC-listed