Skip to content

← neural package

SpatioSpectralDecomposition

Extract components that are most representative of a given "peak" signal.

This node has two alternative modes depending on the input ports used. First, one can provide unfiltered data into the data port. In this case, this node will separate the input signal to a "peak" signal and a "noise" signal using FIR filters designed based on the node's other parameters. For example, the default settings will find components that maximally emphasize the 8-15 Hz band while suppressing activity in the 4-7 Hz and 16-20 Hz bands. Second, one can provide pre-filtered signals directly to the peak_data port and the noise_data port. In that case, it is a good idea to make sure that the two bandpass filters that feed into this node have approximately (or exactly) the same filter order, which could be ensured by setting the order in those filters. The resulting components will usually have a better signal-to-noise ratio than the raw channels for the given frequency band or "peak" signal of interest. This filter is meant to operate on continuous data, i.e., it should not be preceded by a Segmentation node. Also, this filter can adapt itself online, i.e., without the need to buffer calibration data. However, keep in mind that initially the filter will not be perfectly adjusted, and the exact sources that it picks up may change over time, especially at the beginning. If you are using machine learning among the downstream nodes, these could be negatively impacted by this. Version 1.1.0

Ports/Properties

data

Unfiltered data (will be filtered in node).

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

peak_data

Data already filtered to the peak freq band.

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

noise_data

Data already filtered to the noise freq bands.

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

out_data

Output data.

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

peak_frequency_bounds

Lower and upper frequency bounds for the peak data. The upper frequency band value is non inclusive.

verbose name
Peak Frequency Bounds
default value
[8, 15]
port type
ListPort
value type
list (can be None)

peak_noise_gap

Gap, in Hz, between the peak frequencies and the noise 'side lobes'.

verbose name
Peak Noise Gap
default value
1.0
port type
FloatPort
value type
float (can be None)

noise_length

Size of the noise 'side lobes', in Hz.

verbose name
Noise Length
default value
1.0
port type
FloatPort
value type
float (can be None)

filter_order

Filter used used for the FIRFilter when extracting peak and noise data from the data packet.

verbose name
Filter Order
default value
500
port type
IntPort
value type
int (can be None)

nof

Number of spatial filters to learn. This determines the number of output channels. The first few filters are the most useful, so only a small number of filters is usually necessary.

verbose name
Number Of Filters To Learn
default value
3
port type
IntPort
value type
int (can be None)

streaming_update

Perform streaming (online) updates. If enabled, the filter will update itself in an online fashion; otherwise it requires a non-streaming calibration recording at first.

verbose name
Perform Streaming Updates
default value
True
port type
BoolPort
value type
bool (can be None)

half_time

Time constant of adaptive filter, in seconds. Data that lies this many seconds in the past will be weighted half as much as the most recent data when designing the filter, and data twice as old will be weighted by 1/4, etc. Can also be thought of as the half-time of an exponentially weighted filter.

verbose name
Adaptive Filter Time Constant
default value
120
port type
FloatPort
value type
float (can be None)

shrinkage

Shrinkage regularization parameter. This parameter (between 0 and 1) controls the amount of shrinkage regularization applied to the filter estimates. Usually, only a small amount is necessary to prevent degenerate solutions, e.g., when channels are linearly dependent.

verbose name
Shrinkage Regularization
default value
0.01
port type
FloatPort
value type
float (can be None)

model_format

Format of the model of this node. The packet format is a packet with all relevant matrices as separate streams. The legacy format is a dictionary of 3 dictionaries (filters, peak_cov, noise_cov) of matrices, one per stream.

verbose name
Model Format
default value
packet
port type
EnumPort
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)