mvpa2.datasets.eventrelated.assign_conditionlabels(ds, events, label_attr='targets', time_attr='time_coords', **kwargs)

Convert events into a condition label attribute of a dataset

This function is a convenience front-end to events2sample_attr() and supports the same arguments.


ds : dataset

To be labeled dataset.

events : list

List of dictionaries with event definitions.

label_attr : str

Name of the sample attribute with the conditions labels in the output dataset. Note that any existing attribute with this name will be overwritten.

time_attr : str

Name of the sample attribute with the time stamps (time coordinate) for all data samples. This information will be used to match samples with conditions

**kwargs :

All other arguments will be passed on to events2sample_attr()


Dataset :

with condition label attribute