select¶
-
class
neuxus.nodes.select.
ChannelSelector
(input_port, mode, selected)[source]¶ Select a subset of signal channels
- Attributes:
output (port): output port
- Args:
mode (‘index’ or ‘name’): indicate the way to select data
selected (list): column to be selected
- Example:
ChannelSelector(port1, port2, ‘index’, [2, 4, 5]) ChannelSelector(port1, port2, ‘name’, [‘Channel 2’, ‘Channel 4’])
-
class
neuxus.nodes.select.
CommonAverageReference
(input_port)[source]¶ Re-referencing the signal to common average reference consists in subtracting from each sample the average value of the samples of all electrodes at this time Attributes:
output (port): output GroupOfPorts
example: CommonReferenceChannel(input_port)
-
class
neuxus.nodes.select.
ReferenceChannel
(input_port, mode, ref)[source]¶ Subtracts the value of the reference channel from all other channels Attributes:
output (port): output GroupOfPorts
- Args:
mode (‘index’ or ‘name’): indicate the way to select data
reference channel (str or int): column to be substracted
- example: ReferenceChannel(input_port, ‘index’, 4)
or ReferenceChannel(input_port, ‘name’, ‘Cz’)
-
class
neuxus.nodes.select.
SpatialFilter
(input_port, matrix)[source]¶ Maps M inputs to N outputs by multiplying the each input vector with a matrix
- Attributes:
output (port): output GroupOfPorts
- Args:
input_port (port): input port
matrix (dict or str): path to the matrix yaml/xml/cfg file OR dictionnary with new channel name as keys and list of coefficients as values, list must be of the same length as input.channels
- Example:
SpatialFilter(input_port, ‘../example/my_matrix.yaml’) where my_matrix is the following yaml file:
— # Matrix of coefficient for SpatialFilter OC1: [1, 1, 0, 4e-9] OC2: [4, 2, 4, -2] …
SpatialFilter(input_port, ‘../example/my_matrix.cfg’) where my_matrix is the following cfg file:
<SettingValue>7.352412e-002 2.354113e-001 -1.212912e-001 -3.687871e-002 2.785947e-002 9.112804e-003 2.665961e-001 1.635848e-001 -1.540287e-002 -1.944730e-002 -7.130017e-002 -6.074913e-001</SettingValue> <SettingValue>2</SettingValue> <SettingValue>6</SettingValue>
- (first setting values are coefficients
second one is the number of output channels last one is the number of input channels)
SpatialFilter(input_port, matrix) where matrix = {
‘OC2’: [4, 0, -1e-2, 0], ‘OC3’: [0, -1, 2, 4]
}