Condition contrasts
contrasts
module-attribute
¶
contrasts = []
The conditions to contrast via a subtraction of ERPs / ERFs. The list elements can either be tuples or dictionaries (or a mix of both). Each element in the list corresponds to a single contrast.
A tuple specifies a one-vs-one contrast, where the second condition is subtracted from the first.
If a dictionary, must contain the following keys:
name
: a custom name of the contrastconditions
: the conditions to contrastweights
: the weights associated with each condition.
Pass an empty list to avoid calculation of any contrasts.
For the contrasts to be computed, the appropriate conditions must have been
epoched, and therefore the conditions should either match or be subsets of
conditions
above.
Example
Contrast the "left" and the "right" conditions by calculating
left - right
at every time point of the evoked responses:
contrasts = [('left', 'right')] # Note we pass a tuple inside the list!
Contrast the "left" and the "right" conditions within the "auditory" and the "visual" modality, and "auditory" vs "visual" regardless of side:
contrasts = [('auditory/left', 'auditory/right'),
('visual/left', 'visual/right'),
('auditory', 'visual')]
Contrast the "left" and the "right" regardless of side, and compute an arbitrary contrast with a gradient of weights:
contrasts = [
('auditory/left', 'auditory/right'),
{
'name': 'gradedContrast',
'conditions': [
'auditory/left',
'auditory/right',
'visual/left',
'visual/right'
],
'weights': [-1.5, -.5, .5, 1.5]
}
]