eelbrain.pipeline.GroupVar

class eelbrain.pipeline.GroupVar(groups, session=None)

Group membership for each subject

Parameters:
groups : sequence of str | dict

Groups to label. A sequence of group names to label each subject with the group it belongs to (subjects can’t be members of more than one group). Alternatively, a {group: label} dictionary can be used to assign a different label based on group membership.

session : str

Only apply the variable to events from this session.

Examples

Assuming an experiment that defines two groups, 'patient' and 'control', these groups could be labeled with:

GroupVar(['patient', 'control'])