AddProbeLocations¶
Assign probe locations to channels from an fNIRS device.
This takes in a set of source and detector coordinates and adds those to the .source_positions and .positions fields (for source and detector, respectively), of each channel. In addition to the positions, if the space axis does not already hold the channel wavelengths, source and source and detector indexes in the .wavelengths, .sources, and .detectors fields, these will be extracted from the channel names and added. This node takes a pattern (using regex) that defines how the channels are named, so as to be able to identify, from each channel name, the source id (number), detector id, and wavelength, for that channel. This node is used for cases where the position data is not already provided using a standard format (XDF, SNIRF, NIRS). Usually you will need to follow this node with the CoregisterExistingLocations node to convert the coordinates to the coordinate system used by Neuropype. Optionally this node can standardize the channel names to the format S
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
sources¶
A list of xyz coordinates for each source, in order (that is, the first set of xyz coordinates is for Source 1 probe, the second for Source 2 probe, etc.) I.e.: [[17.376,4.6384,17.799], [8.8819,4.1688,17.697], ...].
- verbose name: Sources
- default value: []
- port type: ListPort
- value type: list (can be None)
detectors¶
A list of xyz coordinates for each detector, in order (that is, the first set of xyz coordinates is for Detector 1 probe, the second for Detector 2 probe, etc.) I.e.: [[17.376,4.6384,17.799], [8.8819,4.1688,17.697], ...].
- verbose name: Detectors
- default value: []
- port type: ListPort
- value type: list (can be None)
channel_name_pattern¶
A regex pattern with 3 named groups that define the location, within each channel name, of the source id, detector id and wavelength. These are then used to assign the corresponding source/detector positions to the .source_positions and .positions properties of each channel in the Space axis, and the .wavelength property. This uses regex groups, with (?P<src>\d*) used to identify the source id, (?P<dct>\d*) used to identify the detector id, and (?P<wl>\d*) used to identify the wavelength. I.e., f(?P<wl>\d*)_S(?P<src>\d*)D(?P<dct>\d*) would match the channel name f770_S1D1. The default pattern will match channel names in the format S15-D10-770.
- verbose name: Channel Name Pattern
- default value: S(?P
\d)-D(?P \d )-(?P\d*) - port type: StringPort
- value type: str (can be None)
standardize_channel_names¶
If True, the channel names will be standardized to the format S
- verbose name: Standardize Channel Names
- default value: False
- port type: BoolPort
- value type: bool (can be None)
montage_file¶
Optionally a NIRS montage file (.c sv format) to use. This file should contain exactly 4 variables in the following order (comma-separated): NAME, X, Y, Z. Note that optode names must be a source OR detector per line (e.g. if there are 15 sources and 16 detectors there should be 31 rows), and the name used must match one of the source or detector names present in the input data space axis. Example CSV line: S01, -50.2, -96.4, -34.7. This will replace the .source_positions coordinates for all channels that contain 'S01' in the full name (e.g. S01-D02-760, S01-D14-850). 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)
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)