Skip to content

← source_localization package

AssignChannelLocations

Assign standard channel locations from a pre-defined sensor montage file.

For some devices (such as EEG headsets), specific channel labels correspond to well-known sensor locations, for example "Cz" in EEG is the sensor on the top of the head in the 10-20 labeling system. For each device, there may also be multiple alternative labeling systems (e.g., C3 for the 10-20 system would be in a different place than C3 in the BioSemi system). This node can open a specified montage file and look up the channel locations based on the channel labels in the data (assuming that at least the labels are set in the data), and if no montage file is given, this node can search through all known montages and find the file that best matches the data (in the sense that more of the channel labels in the data are found in the file than in other files). If there is significant ambiguity (e.g., multiple similarly well matching files), a warning will be emitted. Note that the montage to use can also be specified upstream in the SpaceAxis.montage property, which this node will use if montage_type is set to 'auto'. Order of priority for selecting a montage is as follows: montage property > montage_type property (if not 'auto') > SpaceAxis.montage property > auto detect. This node will also set the SpaceAxis.montage property to the montage used, for use by other downstream nodes such as InterpolateMissingChannels. Version 1.3.1

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

montage_type

Choose the montage to use from among a list of common options. If set to auto, the best-matching montage will be used.

verbose name
Montage Type
default value
auto
port type
EnumPort
value type
str (can be None)

montage

Optionally a montage file (.l ocs format) to use. This may be a montage file that ships with Neuropype (available in resources/montages), in which case only the filename is needed, or the full path to a montage located elsewhere. If specified, this will take precedence over the montage type field.

verbose name
Montage File
default value
port type
StringPort
value type
str (can be None)

force_override

Force-override any existing channel locations.

verbose name
Force Override
default value
True
port type
BoolPort
value type
bool (can be None)

verbose

Warn if not all channels match to a known montage.

verbose name
Verbose
default value
True
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)