LCMVBeamforming¶
Estimate brain source activity using the linearly-constrained minimum variance (LCMV) beamforming algorithm.
This node accepts an EEG time series and estimates for each time point the current source density (CSD) for a large number of locations (e.g., several thousand) in the brain. The result is a time series with the EEG channels replaced by as many channels as there are source locations, and otherwise the same format as the input data. The set of source locations is defined by a headmodel, which can be set via the headmodel_file parameter (several generic headmodels are provided with Neuropype, or you can specify any other, such as a subject-specific one). Note that by default the headmodel will be matched to EEG channel space using the EEG channel names, which are then assumed to be in the 10-20 (or the finer-grained 10-5) system. If your EEG channels do not use this label system, you need to know the locations of your channels relative to the 10-20 locations (which can be found in the resources/montages/standard-10-5-* file), and using that, you can either try to replace the channel labels by the closest 10-5 equivalent labels, or, likely better, select the interpolate option in this node to directly interpolate the head model for your given channel locations. Note that, as with other source estimation nodes, the input EEG should have been re-referenced to common average reference, which can be achieved using the ReReferencing node with default settings. Lastly, to use LCMV beamforming, it is also necessary to provide as the secondary input a running estimate of the data covariance matrix. That covariance can be estimated in principle using a variety of techniques (and thus combinations of nodes); one setup is to use the per-element covariance matrix node on the re-referenced EEG, and smooth the result using either the moving average or exponential moving average nodes. Also, since this node uses the average covariance over the data segment, when processing "offline" (non-streaming) data it is recommended to first segment the data (i.e., using ShiftedWindows or Segmentation) prior to this node. Version 1.0.0
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
covariance¶
Data covariance.
- verbose name: Covariance
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
headmodel¶
Head model file to use (*.h m). If omitted, the node checks if the data has a current head model associated with it, e.g., because a previous node has annotated it, and then uses that head model. If a relative path is given, the file is searched in the resources/headmodels folder of the cpe.
- verbose name: Head Model File
- default value:
- port type: StringPort
- value type: str (can be None)
shrinkage¶
Shrinkage regularization strength. This can improve numeric conditioning, especially when the data covariance matrix used was estimated from a very short time window and/or over many channels (e.g., >64). Ad-hoc choices work fairly well.
- verbose name: Regularization Strength
- default value: 0.001
- port type: FloatPort
- value type: float (can be None)
rescale_activations¶
Rescale estimated brain source activations to correct scale. This can be disabled if the scale does not affect subsequent processing (e.g., because of data normalization) and can yield a modest performance improvement.
- verbose name: Rescale Activations
- default value: True
- port type: BoolPort
- value type: bool (can be None)
interpolate¶
Rely on channel locations rather than labels. If this is enabled, the head model will be matched to the data using the channel locations rather than channel labels. This is only useful if the labels are unrecognized (e.g., non-standard labels), and if there are high-quality measured channel locations available. These locations must be in the same coordinate system as NeuroPype's default 10-5 locations (see node documentation for more details).
- verbose name: Interpolate Using Channel Locations
- default value: False
- port type: BoolPort
- value type: bool (can be None)
normalize_leadfield¶
Normalize the lead-field matrix. This can be used to fix problems with the scaling of the lead field matrix (e.g., when using a new or alternative head model).
- verbose name: Normalize Leadfield
- default value: False
- 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)