mvpa2.datasets.eventrelated.events2sample_attr

mvpa2.datasets.eventrelated.events2sample_attr(events, time_coords, noinfolabel=None, onset_shift=0.0, condition_attr='condition')

Build a sample attribute array form an event list

Parameters:

events : list

event specifications as consumed by eventrelated_dataset()

time_coords : array

sample timing information array (typically taking from dataset.sa.time_coords)

noinfolabel : str

condition label to assign to all samples for which no stimulation condition information is contained in the events. Example: ‘rest’

onset_shift : float

All stimulation onset timestamps are shifted by the given amount before being transformed into discrete sample indices. Default: 0.0

condition_attr : str

Name of the key in the event dictionary whose value shall be used as as attribute value for the associated sample(s).

Returns:

list :

Sequence with literal conditions labels – one item per element in the time_coords array.