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

Group membership for each subject

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.


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

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