Reference
- class gpype.backend.transform.reference.Reference[source]
Bases:
IONodeRe-references the signal channels against a chosen reference.
An EEG channel is a voltage difference, and the electrode it is measured against is part of what the number means. Re-referencing chooses that electrode after the fact.
Three forms, in the order they are usually reached for:
a common average, the mean over the referenced channels;
a single or linked electrode, e.g. one mastoid or the mean of both;
explicit bipolar pairs, each output being one difference.
Only measured-signal channels are referenced. Everything else is carried through untouched, so a trigger or an in-band index is not quietly turned into a difference against an average.
- AT_MOST_ONE_OF = (('reference', 'pairs'),)
At most one of these – “Give either ‘reference’ or ‘pairs’, not both”. Both may be absent.
- __init__(reference=None, pairs=None, **kwargs)[source]
Initialize the reference node.
- Parameters:
reference (
Union[str,int,list,None]) – Channels to reference against, each a label or an index. None means the common average over every signal channel. A single entry is a single electrode; two are a linked pair.pairs (
Optional[list]) – Explicit[active, reference]pairs, each entry a label or an index. One output channel per pair.**kwargs – Additional arguments for the parent IONode.
- Raises:
ValueError – If both reference and pairs are given, if either is given but empty, or if an entry is neither a label nor an index.