Module: signal_processing

Signal processing algorithms.

These are generic signal-processing methods that are largely independent of the specific modality of the data (e.g., EEG, eye tracking, and so on). Most of these nodes require that the inbound data has a time axis, and some require that the data also has a space axis (i.e., channels). Some nodes will adapt themselves initially, and will buffer a certain amount of data for this; such nodes will generally adapt themselves each time they receive data marked as non-streaming, unless the initialize_once parameter (if present) is set to True.

AddNoise

Add noise to the given data.

This adds Gaussian distributed noise to the given data values. This node can be used to test the behavior of various other nodes in the presence of noise. It can also be used as a workaround when the data is linearly dependent and some algorithms run into numerical issues as a result. The noise level is calibrated only on non-streaming (e.g., calibration) chunks. That is, to use this node in a live setting, you will need to use another node to first buffer up some calibration data (e.g., AccumulateCalibrationData), or to load pre-recorded calibration data from a file (InjectCalibrationData).

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • relative_amplitude
    Relative noise level. This is the scale of the noise relative to the scale of the data.

    • verbose name: Relative Amplitude
    • default value: 0.01
    • port type: FloatPort
    • value type: float (can be None)
  • absolute_amplitude
    Absolute noise level.

    • verbose name: Absolute Amplitude
    • default value: 0.0
    • port type: FloatPort
    • value type: float (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)

AlignStreams

Aligns multiple streams in the time domain.

Aligns multiple streams by comparing timestamps between streams and trimming the streams to be of equal length. Trims data before the latest start time and after the earliest end time. All streams will be as long as the shortest stream.

Version 1.0.1

Ports/Properties

  • 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)
  • data1
    Input data 1.

    • verbose name: Data1
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data2
    Input data 2.

    • verbose name: Data2
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data3
    Input data 3.

    • verbose name: Data3
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data4
    Input data 4.

    • verbose name: Data4
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data5
    Input data 5.

    • verbose name: Data5
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data6
    Input data 6.

    • verbose name: Data6
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data7
    Input data 7.

    • verbose name: Data7
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data8
    Input data 8.

    • verbose name: Data8
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data9
    Input data 9.

    • verbose name: Data9
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • data10
    Input data 10.

    • verbose name: Data10
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • dataN
    Additional input data.

    • verbose name: Datan
    • default value: None
    • port type: DataPort
    • value type: list (can be None)
    • data direction: IN
  • outdata
    Output data.

    • verbose name: Outdata
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • 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)

AlignWindows

Aligns signals in two data packets.

Takes two packets with windows of different lengths and lines up the signals relative to the start of the window by trimming the data that falls outside of the max timestamp at the start of the packet and the min timestamp at the end of the packet. Will optionally (default=True) also trim all packets to the same length (to account for rounding during the first trim.) Also performs a ShiftTimestamps to account for filter lag.

Version 1.0.1

Ports/Properties

  • 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)
  • data1
    Data input 1.

    • verbose name: Data1
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • data2
    Data input 2.

    • verbose name: Data2
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • standardize_packet_length
    Make sure that all packets are exactly the same length. This will trim all packets to the shortest packet length.

    • verbose name: Standardize Packet Length
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • shift_timestamps
    Run ShiftTimestamps to account for filter lag before alignment. Set to false if you've already run this node for all the incoming packets.

    • verbose name: Shift Timestamps
    • 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)

ApplyLinearTransformation

Calculates a dot product or matrix multiply of the data tensor with a filters tensor.

(If the data and filter tensors have two axes (2D tensors), then a matrix multiply is applied. If they have a single axis (1D tensor), then a dot product is applied.) The data and filters tensor must both have an axis of the same type and size. This node may be used to apply to these data e.g., a spatial filter or linear classifier that was calculated elsewhere.

Version 0.2.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • filters
    The model through which the data will be transformed.

    • verbose name: Filters
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • axis
    Axis along which to align data and filter tensors.

    • verbose name: Transform Along Axis
    • default value: space
    • port type: ComboPort
    • value type: str (can be None)
  • intercept
    Support for linear transforms that expect an intercept feature. This can be set to either prepend or append a special feature that is all-1.

    • verbose name: Handle Intercept
    • default value: no
    • port type: EnumPort
    • value type: str (can be None)
  • segsize
    Set the total number of array items (e.g ., samples) to process segment-by-segment.

    • verbose name: Segsize
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • use_caching
    Enable caching.

    • verbose name: Use Caching
    • 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)

ArtifactRegression

Remove artifacts by regression from data using specified reference channels.

This is an online filter that operates on continuous data, and removes artifacts using a regression technique, if artifact channels (e.g., EOG or EMG) are present (using recursive least squares). Note that noise in the artifact signals may be transferred onto the other channels. This filter is meant to be run on continuous data. Therefore, it should not be preceded by a Segmentation node. This node maintains internal state.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • forget_halftime
    Half-life time constant of 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-life of the weights for an exponentially weighted filter. (default = 60 seconds).

    • verbose name: Adaptive Filter Half-Life Constant
    • default value: 60
    • port type: FloatPort
    • value type: float
  • kernel_length
    Kernel Length. The length/order of the temporal FIR filter kernel.

    • verbose name: Kernel Length
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • reference_axis
    Axis along which to take the reference channels. In most cases this is the space axis.

    • verbose name: Select Reference Along Axis
    • default value: space
    • port type: ComboPort
    • value type: str (can be None)
  • reference_channels
    List of artifact reference channel indices or channel names to use as reference for regression. When the space axis is used, this is typically a channel range (e.g. '0:1', [0, 1]) or list of channel names (e.g. ['Fp1', 'Fp2']).

    • verbose name: Reference Selection
    • default value: :
    • port type: Port
    • value type: object (can be None)
  • reference_unit
    Unit in which the reference selection is given. If the axis is other than space or feature, the unit must be set to indices.

    • verbose name: Unit For Reference Selection
    • default value: indices
    • port type: EnumPort
    • value type: str (can be None)
  • use_caching
    Enable caching.

    • verbose name: Use Caching
    • 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)

CenterOfMass

Find the center of mass or centroid along an axis.

For data with a prominent peak, this can be similar to the peak position along the axis (e.g., in seconds or Hz), and for multiple peaks, the result will lie in between the peaks in contrast to peak finding. The chosen axis will generally be replaced by a one-element feature axis. This uses the absolute values of the data as the weights for calculating the mass. One can also optionally account for the delay of previous filter nodes, to the extent that the data is annotated with it.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which to find the centroid. This axis will drop out of the data and be replaced by a one-element feature axis.

    • verbose name: Find Peak Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • subtract_filter_delay
    Subtract filter delay (time axis only). Note that this is most reliable when used with only linear-phase filters (e.g., FIR filter without minimum phase option), since otherwise the delay will depend on the frequency content of the signal.

    • verbose name: Subtract Filter Delay
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • update_on_streaming
    Update on streaming data. If enabled (default), then this node will update its output measure on every chunk, whether it is marked as streaming or not. If False, then it will only update on non-streaming, chunks, such as calibration data.

    • verbose name: Update On Streaming Data
    • 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)

ChannelBaselineCalibration

This node can be used to "zero" an output signal based on some initial baseline calibration data.

A typical use case is when you have a pipeline that computes an output signal that may be positive or negative, e.g., imagined movement or emotional state, and that output is biased in an undesirable way (e.g., emotional state pegged to "excited"). In such cases you can place this node at the end, an just prior to using the pipeline you gather a baseline period where you know that the desired output should be zero (e.g., neutral emotional state). This node will then compute the average on each channel of the output in that period, store it, and from then on subtract that value from the signal, so that a neutral state yields the desired unbiased zero output. The assumption is that then the entire output range will be shifted roughly as desired (e.g., negative emotional state would be below zero, etc.). The node can also be used on non-streaming data, in which case the baseline will be calculated from the entire data.

Version 1.0.1

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • calib_length
    Data length for calibration. In seconds when applied to a time-domain signal, otherwise this is the number of instances/segments/trials to calibrate on.

    • verbose name: Calibration Duration
    • default value: 15
    • port type: IntPort
    • value type: int (can be None)
  • offline_all
    Whether to use all data in the offline case. If set to False, will also respect the calib_length.

    • verbose name: Use All Data If Non-Streaming
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • estimator
    Type of estimator to use. The median estimator is robust.

    • verbose name: Estimator
    • default value: mean
    • 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)

ChannelSubset

Select a subset of channels to retain.

Different indexing schemes are supported, including regularly spaced indices, random subset, and spatially equidistant subset.

Version 0.5.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • fraction
    Fraction of channels to keep. Either fraction or count must be given.

    • verbose name: Fraction
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • count
    Number of channel to keep. Either fraction or count must be given.

    • verbose name: Count
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • indexing
    Indexing scheme. Regular uses regularly spaced indexes (i.e., channel 1, 3, 5, etc), equidistant uses channels that are maximally evenly spaced in 3d (requires channel positions to be set), and random uses a pseudo-random subset of channels. Depending on how the headset channels are ordered, regular can give less even results than random in unlucky cases.

    • verbose name: Indexing
    • default value: equidistant
    • port type: EnumPort
    • value type: str (can be None)
  • randseed
    Random seed if using random subset.

    • verbose name: Randseed
    • default value: 12345
    • port type: IntPort
    • value type: int (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)

CombineChannels

Combine the given axis elements into new axis elements.

This node can be used to average multiple elements along an axis together into new axis elements (can also sum, take the max, etc.). For example, this can be used on a space axis to merge region-of-interest activations.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • mapping
    Grouping of old axis elements into new axis elements. The syntax is {'new_element1': [index0, index1, ...], 'new_element2': [index3, index4, index5, ...], ...} where 'new_elementX' is the new element name being defined, and the indexX terms are a list of terms to identify the old elements from which each new element would be formed, given as numeric indices (counting from 0), or the name of the old element (which may optionally contain asterisk wildcards). Example: {'mychan': [0,1,2], 'myotherchan': ['oldchanA','oldchanB','oldchanC']}.

    • verbose name: Element Grouping
    • default value: None
    • port type: Port
    • value type: object (can be None)
  • operation
    Operation to perform on the old axis data to form the new axis element.

    • verbose name: Combine Operation
    • default value: average
    • port type: EnumPort
    • value type: str (can be None)
  • write_back
    Define how new elements get written back into the axis. Replace-selected means that only the selected old axis elements will be replaced by the new elements and all non-selected elements will remain, replace-all means that only the new channels will be in the output, and append means that the new elements will be appended at the end.

    • verbose name: Write-Back Mode
    • default value: replace-selected
    • port type: EnumPort
    • value type: str (can be None)
  • ignore_nans
    If activated the axis elements containing nan values are ignored.

    • verbose name: Ignore Elements With Nan Values
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • support_wildcards
    Support wildcard matches in mapping. If enabled, then the old axis element names in the mapping can be strings containing wildcards, such as 'FP*'.

    • verbose name: Support Wildcards In Grouping
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • axis
    The type of axis to operate on. Currently only named axis types (space and feature) are supported. The axis type may be appended by the axis label, separated by a ".", e.g., space.my_label .

    • verbose name: Axis
    • default value: space
    • port type: ComboPort
    • value type: str (can be None)
  • verbose
    Print verbose diagnostic output.

    • verbose name: Verbose
    • 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)

Decimate

Decimate (subsample) the signal by an integer factor.

This filter implements no anti-aliasing filter -- that is, you need to precede this filter by a low-pass filter (e.g., FIR or IIR) which cuts out below half of the new sampling rate. Important: If no anti-aliasing filter is used, then frequency content above the new sampling rate will be mirrored and appear as additional noise in the resampled signal. If this filter is ran along the time axis, it will maintain an internal state to ensure that every k'th sample is picked even across chunk boundaries.

Version 1.0.1

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • factor
    Decimation factor. Only every k'th data value will be transferred into the output.

    • verbose name: Decimate By Factor
    • default value: 2
    • port type: IntPort
    • value type: int (can be None)
  • axis
    Axis along which to decimate.

    • verbose name: Decimate Along Axis
    • default value: time
    • port type: ComboPort
    • 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)

DelayEmbedding

Perform delay embedding of the given signal.

This will add a new axis of type LagAxis to the data, which has n copies of the signal, each delayed by the respective n'th lag in samples. This axis can subsequently be folded into other axes using the Fold Into Axis node. One use of this filter is to convert filters that regularly combine multiple channels into filters that combine both channels and time points (i.e., to turn spatial filters into spatio-temporal filters). An example is to turn Common Spatial Patterns (CSP) into Common Spatio-Spectral Patterns (CSSP) by preceding CSP with a delay embedding node.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • lags
    Lags to use. This is a list of positive offsets, in samples, referring to past samples.

    • verbose name: Lags
    • default value: [0, 1, 2, 3]
    • port type: ListPort
    • value type: list (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)

DelaySignal

Delay signal by a given number of samples.

In contrast to ShiftTimestamps, this delays the signal content (i.e., shifts the data), instead of revising the timestamps of the data. This can be used e.g., to concatenate or add shifted versions of the signal.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • delay
    Amount by which to delay the signal.

    • verbose name: Delay
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • delay_unit
    Unit of the specified delay.

    • verbose name: Delay Unit
    • default value: samples
    • 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)

DetectLineNoise

Detects the line noise (mains) frequency of raw signal data, as a float.

Sets a stream property named mains_frequency to this value, and outputs the value through a port by the same name. Outputs a second port with a list of four values that include the falloff range and peak width of the mains frequency, which can, be wired into to a bandpass filter node (i.e., IIR Filter or FIR Filter), to remove line noise with a notch filter. Important: If using this node on streaming data, you must use the AccumulateCalibrationData node, or another buffering node, upstream create a buffer of several seconds of data from which to detect the line noise.

Version 1.1.2

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • bandpass_list
    Creates a list of values to be passed into a bandpass filter node, including peak width and falloff range values.

    • verbose name: Bandpass List
    • default value: None
    • port type: DataPort
    • value type: list (can be None)
    • data direction: OUT
  • mains_frequency
    The frequency of the detected line noise, as a float.

    • verbose name: Mains Frequency
    • default value: None
    • port type: DataPort
    • value type: float (can be None)
    • data direction: OUT
  • verbose
    Set to false to suppress warnings that rereferencing was not performed (no reference data, data is wrong shape, etc.) .

    • verbose name: Verbose
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • window
    Type of window function to apply to sub-windows. Different functions have different spectral and temporal localization characteristics. One of the simplest well-behaved windows is the Hann window (the default).

    • verbose name: Window Function For Sub-Windows
    • default value: hann
    • port type: EnumPort
    • value type: str (can be None)
  • detrend
    Sub-window detrending method. In the Welch method, linear trends or constant offsets can be removed from each window prior to spectral estimation.

    • verbose name: Sub-Window Detrending
    • default value: off
    • port type: EnumPort
    • value type: str (can be None)
  • segment_samples
    Length of the sub-windows for spectral estimation. This may have to be adjusted for data with high (multi-kilohertz) sampling rates. This node will extract successive windows from the given data of this length, which are overlapped according to the overlap samples parameter. Longer windows will give a higher-resolution spectrum, but at the same time the result will increase the smoothness (i.e., blurriness) along the time axis. The tradeoff between time resolution and frequency resolution that can be adjusted via this parameter is fundamental.

    • verbose name: Sub-Window Length (Samples)
    • default value: 256
    • port type: FloatPort
    • value type: float (can be None)
  • fft_size
    Length of the FFT used, in samples. Using a higher number will yield a finer stepping along the frequency axis, without a change in frequency or temporal detail (the frequency axis will be correspondingly more smooth to counter the finer stepping). If not given, it defaults to the sub-window length.

    • verbose name: Fft Size
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • scaling
    Scaling of the spectrum. In density mode, the result is divided by the frequency; this yields the power-spectral density, and is the default. However, this will incur a falloff towards higher frequencies which may be addressed separately using the frequency normalization node.

    • verbose name: Spectral Scaling Mode
    • default value: density
    • port type: EnumPort
    • value type: str (can be None)
  • fit_frequency_range
    Fit the spectra between these frequency ranges to calculate alpha value. Default: all frequencies.

    • verbose name: Fit Frequency Range
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • alpha
    The exponent of 1/f^alpha used in the correction. Set to None to determine the value automatically.

    • verbose name: Alpha
    • default value: 1.0
    • port type: FloatPort
    • value type: float (can be None)
  • frequency_band
    Provide a plus-minus value to find the main frequency for a range around 50 Hz or 60 Hz. Default value of 0 calculates the PSD value specifically at 50 Hz or 60 Hz.

    • verbose name: Frequency Band
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • left_falloff_range
    Used for output when connecting to a FIR Filter or IIR Filter node. Specifies the falloff range to the left of the notch.

    • verbose name: Left Falloff Range
    • default value: 0
    • port type: FloatPort
    • value type: float (can be None)
  • right_falloff_range
    Used for output when connecting to a FIR Filter or IIR Filter node. Specifies the falloff range to the right of the notch.

    • verbose name: Right Falloff Range
    • default value: 0
    • port type: FloatPort
    • value type: float (can be None)
  • peak_width
    Used for output when connecting to a FIR Filter or IIR Filter node. Specifies the width on either side of the peak to be removed by a bandpass filter.

    • verbose name: Peak Width
    • default value: 0
    • port type: FloatPort
    • value type: float (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)

Detrend

Remove trends from the given data.

For instance, linear slopes or constant offsets. Important: when detrending along time, note that this filter detrends each chunk separately -- on streaming data, these chunks can be very short and have variable length, so you almost certainly want to do this on extracted segments (see, e.g., Segmentation node for how to do this).

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • method
    Type of trend to remove. Constant will remove constant offsets, and linear will remove linear slopes.

    • verbose name: Type Of Trend
    • default value: linear
    • port type: EnumPort
    • value type: str (can be None)
  • axis
    Axis along which to remove trends. For instance, using frequency here means that linear slopes along the frequency axis will be removed (if the data has a frequency axis). Rarely anything other than 'time' is used here.

    • verbose name: Detrend Along Axis
    • default value: time
    • port type: ComboPort
    • 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)

ExponentialMovingAverage

Smooth the given data using an exponentially decaying window.

This filter outputs a weighted average of the past data, where more recent samples are weighted more strongly. The time constant of this exponential weighting is an adjustable parameter. This filter is meant to be run on continuous data. Therefore, it should not be preceded by a Segmentation node. This node maintains internal state.

More Info...

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • forget_halftime
    Half-life time constant of 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-life of the weights for an exponentially weighted filter.

    • verbose name: Adaptive Filter Half-Life Constant
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • e_folding_time
    The e-fold time constant of filter , in seconds. Data that lies this many seconds in the past will be weighted 1/e as much as the most recent data when designing the filter.

    • verbose name: Adaptive Filter E-Folding Time Constant
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • forget_factor
    The weighting of the incoming sample. This is an alternative specification of the EMA wherein the sample is weighted by 0 < alpha << 1, and the mean is weighted by (1-alpha).

    • verbose name: Forget Factor
    • default value: None
    • port type: FloatPort
    • value type: float (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)

ExponentialStandardization

Standardize the given data using an exponentially decaying window.

This filter aims to produce standardized output signals (that is, each channel/feature has approximately mean zero and variance one). This is based on the statistics of the past data, where more recent data is weighted more strongly. The time constant of this exponential weighting is an adjustible parameter. This filter is meant to be run on continuous data. That is, it should not be preceded by a Segmentation node.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • forget_halftime
    Time constant of 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: 60
    • port type: FloatPort
    • value type: float (can be None)
  • ignore_nans
    If activated the data slices containing nan values are ignored.

    • verbose name: Ignore Data With Nan Values
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • across_all_chs
    If activated the standardization is performed across all entries in the non-time axes, ie., the mean and standard deviation is calculated over the entire tensor snapshot.

    • verbose name: Standardize Across Entire Tensor
    • 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)

FIRFilter

Apply FIR filter to signal.

Together with the IIR filter, this is one of the two default ways to select or remove frequency bands in a signal. The FIR filter delays the signal more than the IIR filter, but has less signal phase distortion in the region between passband (retained frequencies) and stopband (suppressed frequencies); however, the FIR filter is more CPU intensive for the same amount of filtering, especially when the low cutoff frequencies are being used. This filter maintains internal state to filter seamlessly across chunk boundaries. On the first few samples the filter will exhibit some minor artifacts, but is initialized to have minimal step response.

More Info...

Version 1.1.2

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • kernel
    Filter kernel.

    • verbose name: Kernel
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • axis
    Axis along which to filter. Rarely anything other than 'time' is used here.

    • verbose name: Filter Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • order
    Filter order. If unspecified, this will be auto-determined based on the tightness of the transition bands and the desired stopband attenuation (using the Kaiser window rule). Note that high orders (e.g., 1000 or greater) will be fairly heavy on the CPU, especially with many channels.

    • verbose name: Filter Order
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • frequencies
    Transition frequencies. For a lowpass/highpass filter, you can either give the cutoff frequency, or two frequencies to determine the rolloff curve. For a bandpass/bandstop filter, you can give two cutoff frequencies, or 4 frequencies to determine the rolloff curve. The syntax for 'freeform' filters is [(frequency1, gain1), (frequency2, gain2), ...], and you can use the special frequency value -1 as a stand-in for the highest frequency at which a filter can be designed for the given sampling rate (the signal's Nyquist frequency).

    • verbose name: Frequencies
    • default value: [0.25, 0.5, 45, 50]
    • port type: ListPort
    • value type: list (can be None)
  • mode
    Filter mode. Low/highpass lets low/high frequencies through, bandpass lets frequencies in a limited band through, and bandstop (a.k.a. notch) removes frequency in a limited band. The freeform mode (rarely used) can design arbitrary filters by specifying frequencies in the spectrum and corresponding desired gain factors.

    • verbose name: Filter Mode
    • default value: bandpass
    • port type: EnumPort
    • value type: str (can be None)
  • minimum_phase
    Design minimum-phase filter. If enabled, a filter with minimum signal delay will be designed, which will distort the signal phases, especially in the transition region. If disabled, a linear-phase filter will be designed, which will not distort the signal at all, but which incurs a delay of half the filter order in samples.

    • verbose name: Minimum Phase
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • antisymmetric
    Design antisymmetric filter. This designs rarely-used / special-purpose filters for signal differentiation or 90 degree phase shifting. Make sure you specify the order explicitly and choose and odd number if you use this.

    • verbose name: Antisymmetric
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • stop_atten
    Minimum attenuation in stopband. This is the minimum acceptable attenuation, in dB, in the stopband, which is ideally infinitely suppressed, but in practice 30-80 dB are enough, depending on the amplitudes of the signals to attenuate.

    • verbose name: Min Stopband Attenuation
    • default value: 50.0
    • port type: FloatPort
    • value type: float (can be None)
  • convolution_method
    FIRFilter coefficients can be convolved with the input signal using multiple methods. The standard method performs time-domain convolution. For long signals (>214 samples) using filters with a modest number of coefficients (>24), it can be faster to do the convolution in the frequency domain using the overlap-add method.

    • verbose name: Method Of Convolution
    • default value: standard
    • port type: EnumPort
    • value type: str (can be None)
  • cut_preringing
    Cut off the pre-ringing portion generated by the filter. This is currently only supported in linear-phase mode and offline.

    • verbose name: Cut Preringing
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • direction
    Filtering direction. This describes how information is propagated during the filter process. Forward means that an event (e.g., a spike) will result in a ripple that follows the event. Forward-backward means that the ripple will propagate in both directions, and will be symmetric around the event, but this results in effects preceding their causes, which can be problematic when performing causality analysis and is not replicable in real time. Gap-aware filtering additionally respects data boundaries (e.g., where bad time windows have been cut out) and does not propagate information across them.

    • verbose name: Filtering Direction
    • default value: forward
    • port type: EnumPort
    • value type: str (can be None)
  • verbose
    Enable verbose logging. This will log when the filtering is completed and duration of the filtering process.

    • verbose name: Verbose
    • 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)

FixGaps

Fix up data gaps in time series.

This node can be used to perform some basic "repairs" of gaps in time-series data to mitigate erratic behavior of later-stage processing nodes, such as filters and other signal processing. When a gap occurs in a time series, it means that a piece of signal is missing. If one were to stitch the data together as if the gap did not happen, then at the very least there will be jump in signal level, which causes filter "ringing" artifacts. This node can be used to correct level jumps by shifting the subsequent data by the correct amount. The node can also be used to rewrite the time stamps to make the gap undetectable to subsequent nodes. Note that this is not necessarily a good thing, since it can result in data being apparently co-located that may have been separated by an arbitrarily long stretch of data -- however, doing so will prevent "hard failures" where an algorithm would otherwise refuse to to run due to it not being able to handle gaps.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • gap_threshold
    Gap length in seconds above which the stitcher kicks in.

    • verbose name: Gap Threshold
    • default value: 0.1
    • port type: FloatPort
    • value type: float (can be None)
  • stitch_level_jumps
    Whether to fix level jumps by moving the time series following a gap up or down to match the signal level.

    • verbose name: Stitch Level Jumps
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • squeeze_time_gaps
    Whether to squeeze out gaps in the time stamps, making the time series appear continuous.

    • verbose name: Squeeze Time Gaps
    • 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)

FrequencyNormalization

Correct for 1/f frequency falloff.

The frequency spectrum of the given data will be multiplied by its repective frequencies to correct for the typical 1/f falloff curve observed in spectral energy from natural sources. This filter will only process chunks that have a frequency axis (i.e., after transform into the spectral domain).

More Info...

Version 1.1.1

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • fit_frequency_range
    Fit the spectra between these frequency ranges to calculate alpha value. Default: all frequencies.

    • verbose name: Fit Frequency Range
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • alpha
    The exponent of 1/f^alpha used in the correction. Set to None to determine the value automatically.

    • verbose name: Alpha
    • default value: 1.0
    • port type: FloatPort
    • value type: float (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)

GuessSamplingRate

Finds the estimated sampling rate of streamed data.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • effective_srate
    The effective sampling rate.

    • verbose name: Effective Srate
    • default value: None
    • port type: DataPort
    • value type: float (can be None)
    • data direction: OUT
  • nominal_srate
    The nominal sampling rate.

    • verbose name: Nominal Srate
    • default value: None
    • port type: DataPort
    • value type: int (can be None)
    • data direction: OUT
  • large_gap_threshold
    Maximum gap length between timestamps measured in seconds. Longer gaps are automatically discarded from the sample rate calculation.

    • verbose name: Large Gap Threshold
    • default value: 5.0
    • port type: FloatPort
    • value type: float (can be None)
  • min_burst_speedup
    Parameter for checking whether the median of the difference between time stamps is small compared to the approximated sample rate calculated from the mean of differences. This factor helps to determine the signal type: piecewise constant, piecewise linear, not chunked, etc.

    • verbose name: Piecewise Constant Threshold
    • default value: 10.0
    • port type: FloatPort
    • value type: float (can be None)
  • min_chunk_samples
    Minimum number of samples per outputted chunk in data.

    • verbose name: Minimum Chunk Length
    • default value: 5
    • port type: IntPort
    • value type: int (can be None)
  • max_packet_loss_fraction
    Estimated maximum number of 'bad samples' in the data. Used as a parameter in calculating the trimmed mean for data that is not chunked.

    • verbose name: Estimated Proportion Of Bad Samples
    • default value: 0.05
    • port type: FloatPort
    • value type: float (can be None)
  • max_srate_relerr
    Relative tolerance used to calculate nominal sample rate from calculated sample rate. Tolerance is used to compare calculated sample rate from list of typical, standard sample rates.

    • verbose name: Sample Rate Relative Tolerance
    • default value: 0.0005
    • port type: FloatPort
    • value type: float (can be None)
  • init_on
    Time range to calibrate (initialize) the filter on. This parameter can take a single number or two numbers. In case of streaming data, this should always be a single number, representing the number of seconds to buffer from the start of the data, for calibration. In case of offline (recorded) data, this can either be a single number, in which case it represents the window of time in seconds from the beginning of the recording to be used; or, it can be a list of two numbers, in which case this refers to a range of data in seconds, relative to the start of the data, to be used for calibration. The latter allows you to calibrate on data other than the first segment of the data (i.e., if known to be bad), or to avoid running the (fairly expensive) filter on a very long file or on each fold of a cross-validation. Note that a value of 0 here will in the case of offline data be interpreted as the entire file, and in the case of streaming data will raise an error.

    • verbose name: Calibration Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • calib_seconds
    Amount of data, in seconds, to buffer for calibration on streaming data. For offline (non-streaming) data use the "calibration range" (init_on) parameter instead.

    • verbose name: Calib Seconds
    • default value: 30
    • port type: IntPort
    • value type: int (can be None)
  • verbose
    Log more information.

    • verbose name: Verbose
    • 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)

IIRFilter

Apply IIR filter to signal.

Together with the FIR filter, this is one of the two default ways to select or remove frequency bands in a signal. The IIR filter delays the signal less than the FIR filter, at the cost of increased signal phase distortion, especially in the region between passband (retained frequencies) and stopband (suppressed frequencies). The IIR filter is also less CPU intensive for the same amount of filtering. This filter maintains internal state to filter seamlessly across chunk boundaries. On the first few samples the filter will exhibit some minor artifacts, but is initialized to have minimal step response. Note that filter instability is not a concern with this implementation, since it is realized as a cascade of second-order sections (or biquads), rather than a simple direct-form I or II filter design.

More Info...

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which to filter. Rarely anything other than 'time' is used here.

    • verbose name: Filter Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • order
    Filter order. If unspecified, this will be auto-determined based on the tightness of the transition bands and the desired attenuation strength, except for the 'freeform' filter mode and the 'Bessel' filter design, where it must be given. A larger order (e.g., 8 or higher) will result in larger signal delay, but can handle steeper and more complex frequency responses.

    • verbose name: Filter Order
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • frequencies
    Transition frequencies. For a lowpass/highpass filter, you can either give the cutoff frequency, or two freqencies to determine the rolloff curve. For a bandpass/bandstop filter, you can give two cutoff frequencies, or 4 frequencies to determine the rolloff curve. The syntax for 'free-form' filters is [(frequency1, gain1), (frequency2, gain2), ...], and you can use the special frequency value -1 as a stand-in for the highest frequency at which a filter can be designed for the given sampling rate (the signal's Nyquist frequency).

    • verbose name: Frequencies
    • default value: [0.1, 0.5, 45, 50]
    • port type: ListPort
    • value type: list (can be None)
  • mode
    Filter mode. Low/highpass lets low/high frequencies through, bandpass lets frequencies in a limited band through, and bandstop (a.k.a. notch) removes frequency in a limited band. The freeform mode (rarely used) can design arbitrary filters by specifying frequencies in the spectrum and corresponding desired gain factors.

    • verbose name: Filter Mode
    • default value: bandpass
    • port type: EnumPort
    • value type: str (can be None)
  • design
    Filter design rule to use. A Butterworth filter has a flat passband response, Chebychev Type-I has a steeper rolloff than Butterworth at the expense of larger passband ripples, and Chebychev Type-II also has steeper rolloff but larger stopband ripples. The Elliptic filter has maximally steep rolloff at the cost of larger ripple in both stopband and passband. The Bessel filter has a maximally linear phase response, meaning that the signal in the rolloff region is least distorted. For a freeform filter, the Yule-Walker method is always used and the design parameter is ignored.

    • verbose name: Filter Design
    • default value: butter
    • port type: EnumPort
    • value type: str (can be None)
  • stop_atten
    Minimum attenuation in stopband. This is the minimum acceptable attenuation, in dB, in the stopband, which is ideally infinitely suppressed, but in practice 30-80 dB are enough, depending on the amplitudes of the signals to attenuate.

    • verbose name: Min Stopband Attenuation
    • default value: 50.0
    • port type: FloatPort
    • value type: float (can be None)
  • pass_loss
    Maximum attenuation in passband. This is the maximum amount of signal attenuation, in dB, that is tolerated in the passband (which is ideally flat, i.e., 0 dB deviation).

    • verbose name: Max Passband Attentuation
    • default value: 3.0
    • port type: FloatPort
    • value type: float (can be None)
  • ignore_nans
    If activated the channels containing nan values are ignored.

    • verbose name: Ignore Channels With Nan Values
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • offline_filtfilt
    If the signal is not streaming (i.e ., offline), then perform a zero-phase filtfilt operation. As a result, the signal experiences zero time shift, and consequently no time-stamp correction is necessary.

    • verbose name: Forward-Backward Filtering (Noncausal)
    • 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)

IncrementalWhitening

Perform a whitening (sphering) transform of the signal incrementally.

This node progressively updates, over the course of a recording, a linear spatial transform that can be interpreted as a ZCA or decorrelation (and scaling to unit norm) of channels. The method supports shrinkage for rank-deficient and/or high-channel data, block updates for increased performance, riemannian or euclidean geometry (riemannian can work better for decent-quality but non-stationary data, but euclidean will likely be more resilient in the presence of bad-quality data). The method can also use robust (outlier-tolerant) updates, but note that this likely requires parameter tuning for the given data (while the non-robust mode uses optimal recursive updates). Robustness works best if the initial part of the data is reasonably clean since bad onset artifacts can potentially throw off the estimator. There is also an experimental mode that can track the principal subspace of the data more efficiently, although this should rarely be needed. Another advanced use case is that for very high-dimensional data, a spatial prior matrix can be passed in that encodes the likelihood of any two channels being correlated. This matrix can be obtained with the CovarianceTaper node.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • spatial_taper
    Spatial taper.

    • verbose name: Spatial Taper
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • subtract_mean
    Subtract signal mean. If set to False, the signal must already be approx. zero mean (e.g., highpass filtered).

    • verbose name: Subtract Mean
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • regularization
    Shrinkage regulariation strength. Larger values yield more conservative (but less adapted) whitening transforms. Typically only a very small value (e.g., 1e-6 to 1e-3) is necessary to avoid degenerate solutions. The Riemannian variants may require a slightly larger regularization.

    • verbose name: Regularization Strength
    • default value: 1e-06
    • port type: FloatPort
    • value type: float (can be None)
  • step_size
    Step size when performing block updates. Processing performance at very high channel counts is increased by this factor. When selecting Riemann geometry (or blockwise Euclidean), then this is also used as the effective block size. When doing robust estimation, could be matched to the time scale of expected artifacts (e.g., 1-5 seconds), or, for Riemannian estimation, this may be set to be long enough to obtain good block covariance estimates.

    • verbose name: Step Size
    • default value: 1
    • port type: IntPort
    • value type: int (can be None)
  • step_size_unit
    Unit for the step size value.

    • verbose name: Step Size Unit
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • method
    Method to use for sphereing. The typical choice is eigh. The pinv method is mostly included for reference (it works even if regularization is zero). The rhh method is experimental for the special case where only a lower-dimensional dominant subspace shall be tracked and fast per-sample updates are desired. This method can be more brittle in the presence of artifacts, and is not compatible robust and/or riemannian modes.

    • verbose name: Sphereing Method
    • default value: eigh
    • port type: EnumPort
    • value type: str (can be None)
  • geometry
    Whether to average covariance matrices using a Riemannian assumption. This is theoretically a more ideal way to average covariance matrices, particularly in the presence of non-stationarity, but it can be more brittle due its need for well-behaved matrices in each block update (stepsize samples). The Euclidean (blockwise) mode can be chosen to use the same processing pathway as the Riemannian mode, except that the geometry is Euclidean.

    • verbose name: Geometry
    • default value: euclidean
    • port type: EnumPort
    • value type: str (can be None)
  • robust
    Whether to use a robust estimator. When enabled, the Robbins-Monro algorithm is used, which is configured via the parameters rm_gamma, rm_alpha, and rm_sag. The type of estimator is configured using the huber_thresold parameter. These parameters can be somewhat finicky to tune and they interact. Some settings worth trying are: 1) sag=False, huber=0, gamma=median covariance deviation, alpha=1; 2) sag=True; huber=1.35*median covariance deviation, gamma=1.5 to 2.5, alpha=0.75.

    • verbose name: Robust
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • huber_threshold
    Huber threshold, applies only when using a robust estimator. If set to 0, the geometric (or l1) median is used. This has the highest breakdown point (50% data corruption), but, like the median, it will effectively utilize the most central covariance matrix in the data sample (pooled across blocks or across samples), which may not be a good estimate if raw block estimates are low quality (e.g., estimated on too-short blocks). If set to >0, a Huber estimator is used. This value is then ideally set to a value that's some factor of the median deviation of each covariance matrix to the centroid (in terms of Euclidean or Riemannian distance), and a typical choice is 1.35x (which retains 95% of the variance). Due to the median deviation being data-specific, this needs to be tuned for a given study. If set to None, the non-robust least-squares estimator (i.e., mean covariance) is used, which can be used to assess convergence with a given set of gamma, sag and alpha parameters (comparing to the robust=False behavior, which uses the exact recursive mean). In verbose mode, this will print the per-sample deviation values, which can be used to set the huber threshold appropriately.

    • verbose name: Huber Threshold
    • default value: 0.0
    • port type: FloatPort
    • value type: float (can be None)
  • rm_sag
    Use stochastic average gradient descent for robust estimation. In theory this causes the estimator to converge more quickly. However, on non-stationary time-series data and/or bad initial data (at the beginning of the recording), this can likely also backfire and make the other parmameters more difficult to tune.

    • verbose name: Stochastic Average Gradient
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • rm_gamma
    Gamma parameter (learning rate) of Robbins-Monro algorithm when using a robust method. To tune this parameter, several heuristics are available: 1) exponentially spaced grid search up to some multiple of the median covariance deviation, 2) a value near the covariance deviation (e.g., if huber=0, sag=False, alpha~1), 3) a value between 1 and 3, (if sag=True and alpha=0.75). Note that the deviation will differ starkly between sample-wise or block-wise covariance matrices, across different block sizes, as well as riemannian vs euclidean settings.

    • verbose name: Robust Learning Rate
    • default value: 2.0
    • port type: FloatPort
    • value type: float (can be None)
  • rm_alpha
    Alpha parameter of Robbins-Monro algorithm when using a robust method. This parameter typically does not require much tuning, but can instead be set to close to or exactly 1 (if sag=False), or 3/4 (if sag=True). A setting of 2/3 has also been proposed for sag=True, but results may not differ much from the 3/4 setting.

    • verbose name: Robust Learning Rate Decay
    • default value: 0.75
    • port type: FloatPort
    • value type: float (can be None)
  • subspace_dim
    Dimensionality of the subspace when using the rhh method. This can be an integer, or if <1 it is taken as a fraction of the number of channels. The compute time of the method is proportional to this.

    • verbose name: Subspace Dim
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • forget_factor
    Forget factor when the rhh method is being used.

    • verbose name: Forget Factor
    • default value: 0.9999
    • port type: FloatPort
    • value type: float (can be None)
  • min_ev
    Minimum eigenvalue threshold when inverting the covariance matrix. This can prevent errors when whitening data with very high channel counts on very little data.

    • verbose name: Min Ev
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • regularize_towards
    Target matrix for regularization. The 'eye' option is the identity matrix, the 'scaled-eye' option is the identity matrix scaled to the average variance of the data, and the 'diag' option is a diagonal matrix with the same diagonal as the covariance matrix. This is mostly relevant for very high regularization values (>0.1).

    • verbose name: Regularize Towards
    • default value: diag
    • port type: EnumPort
    • value type: str (can be None)
  • update_on
    Time range to initialize on. If two numbers are given, in seconds from the first sample, then the filter will be updated only on that sub-slice of the data.

    • verbose name: Update During This Time Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • update_on_markers
    List of markers on which to update. This can contain wildcard characters. This mode is useful if trials should not be interrupted by changes of the whitening matrix. Instead the node can be configured to update e.g., only after each trial has completed.

    • verbose name: Update On Markers
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • apply_retroactive
    Apply the transform retroactively to the segment that it was estimated on. This is all data since the last update. Note that this is not currently online capable, and would effectively only emit a chunk on each update.

    • verbose name: Apply Retroactive
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • warnings_as_errors
    Treat numerics warnings as errors. This applies when invalid eigenvalues (usually due to rank-deficient matrices) occur in the data, which can help detect potential issues early during processing.

    • verbose name: Warnings As Errors
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • nan_check
    Check for NaN or infinity values.

    • verbose name: Nan Check
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_resets
    Ignore signal resets.

    • verbose name: Ignore Resets
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Compute backend to use. The cupy and torch backends can be faster on data with many channels (e.g., >500) and if the system has a CUDA-capable GPU installed. Keep means to use whatever was used to create the incoming data.

    • verbose name: Backend
    • default value: keep
    • port type: EnumPort
    • value type: str (can be None)
  • precision
    Numeric precision to use. Can be reduced to save memory (e.g. if running on GPU). Only needed for the largest of problems, and only used by the geometric and huber centroids.

    • verbose name: Precision
    • default value: keep
    • port type: EnumPort
    • value type: str (can be None)
  • use_caching
    Use caching.

    • verbose name: Use Caching
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • verbose
    Use verbose output.

    • verbose name: Verbose
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_interval
    Print interval in seconds for verbose output.

    • verbose name: Print Interval
    • default value: 30
    • port type: IntPort
    • value type: int (can be None)
  • channel_grouping
    Optional channel grouping. Given as a list/vector of group indices per channel (0-based). Whitening will only take place within each group. This can also be set to True to effectively perform adaptive per-channel scaling with no decorrelation.

    • verbose name: Channel Grouping
    • default value: None
    • port type: Port
    • value type: object (can be None)
  • group_average
    Average the whitening coefficients across groups. This effectively forces channels in different groups to share the same whitening. This requires equal-sized groups, and channels must be sorted in a compatible (e.g., identical) order in each groups.

    • verbose name: Identical Across Groups
    • 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)

InfomaxICA

Compute an ICA solution on calibration data and subsequently transform data into component space.

Note that this filter does not update itself incrementally -- once it is calibrated, the solution will remain fixed, and is used to transform both the calibration data, and any subsequent streaming data. The difference between this filter and the ICA method under the Feature Extraction category is that this one accepts a channels by time signal, and outputs a components by time signal, whereas the other method can operate on data of any dimensionality and axes, and outputs a feature axis (which is not as readily usable if you want to chain other nodes from the filters category after it). Also, Infomax ICA is considered a higher-quality approach for EEG and MEG than the FastICA algorithm used in the other node. If this filter is used on streaming data and has not yet been calibrated, then it will first buffer n seconds of calibration data to determine some statistics, before any output is produced.

More Info...

Version 1.2.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • max_iters
    Number of iterations. This will determine how long it takes for the algorithm to calibrate itself once the calibration data has been collected. Lower values will result in less accurate components being learned.

    • verbose name: Number Of Iterations
    • default value: 1200
    • port type: IntPort
    • value type: int (can be None)
  • method
    Method to use. This can be used to compare performance between the methods.

    • verbose name: Method
    • default value: infomax
    • port type: EnumPort
    • value type: str (can be None)
  • learning_rate
    Learning rate. Reduce if the algorithm diverges on your data.

    • verbose name: Learning Rate
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • verbosity
    Verbosity level.

    • verbose name: Verbosity
    • default value: 1
    • port type: IntPort
    • value type: int (can be None)
  • calib_seconds
    Amount of data, in seconds, to gather for calibration. When this filter is run online and has not yet been calibrated, then it will first buffer this many seconds of data in order to compute its solution before any output is produced. Note that, when you have many channels, this algorithm requires quite a bit of calibration data.

    • verbose name: Gather This Much Calibration Data
    • default value: 300
    • port type: IntPort
    • value type: int (can be None)
  • include_chunks
    Chunks to include along with the filtered data as additional streams. It is recommended to include at least the patterns (weight inverse) matrix, which is necessary for component interpretation and classification. The streams start with the same name prefix as the input data, and end with -ica_{matrix name}, e.g., 'eeg-ica_patterns' if your input stream is named 'eeg'. Note the original channel level input stream (e.g. 'eeg') will be output as the source level IC activations and the space axis that contained the channels will be replaced by a feature axis that contains the component numbers.

    • verbose name: Include Chunks
    • default value: ['patterns']
    • port type: SubsetPort
    • value type: list (can be None)
  • use_caching
    Enable caching. This will significantly speed up re-use of the same data.

    • verbose name: Use Caching
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • order_by_var
    Reorder components by descending variance of component activations in calibration data.

    • verbose name: Order By Var
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Keep is the current default, which resolves to that of the template array if one is provided and otherwise numpy unless overridden. Numpy is the standard CPU backend that underpins most of NeuroPype's operations. The others require one or more GPUs to be present on the system, except for torch-cpu. For best performance, keep all arrays that interact with each other (via processing nodes) on the same backend.

    • verbose name: Backend
    • default value: keep
    • port type: EnumPort
    • value type: str (can be None)
  • precision
    Numeric precision to use. Keep resolves to the precision of the template array if one is provided, and otherwise to the current default (usually 64-bit). Can be reduced to save memory (e.g. if running on GPU).

    • verbose name: Precision
    • default value: keep
    • port type: EnumPort
    • value type: str (can be None)
  • num_cores
    Enforce maximum number of cores to use. If None, this doesn't do anything. If set to -1, this will allow the node to use all cores (including hyperthreads) on the machine. It can be helpful to set this to the number of physical processors on the machine.

    • verbose name: Num Cores
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • random_seed
    Random seed. Different values may yield slightly different results.

    • verbose name: Random Seed
    • default value: 12345
    • port type: IntPort
    • value type: int (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)

Interpolate

Interpolate the given data along a desired axis.

This node supports either interpolation at a regular rate, or at some desired sampling points (if given). The node can also be used in a real-time setting, in which case the online_lookahead should be set to a value that fits the use case. Also note that for online operation, the time domain of the data should be on NeuroPype's real time clock, which is the one used by LSLInput and OverrideTimestamps, among others.

More Info...

Version 1.0.2

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • new_points
    Optional list of points at which to calculate the data.

    • verbose name: New Points
    • default value: None
    • port type: DataPort
    • value type: AnyArray (can be None)
    • data direction: IN
  • axis
    Axis along which the interpolation should be applied.

    • verbose name: Interp Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • sampling_rate
    Desired sampling rate. This is in number of samples per data unit to produce (e.g., for the time axis, it is in Hz) if a regular output is desired. In the online case this may also be set to 0 (irregular), which causes the node to produce exactly one output sample on each update, and therefore the effective sampling rate equals the rate with which the node is being updated.

    • verbose name: Sampling Rate
    • default value: 10
    • port type: FloatPort
    • value type: float (can be None)
  • kind
    Specifies the kind of interpolation. ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order. If specify_order is selected then the order param must also be specified (expert parameter).

    • verbose name: Kind Of Interpolation
    • default value: quadratic
    • port type: EnumPort
    • value type: str (can be None)
  • online_lookahead
    Desired lookahead for online operation. Since this node needs to see future samples for real-time use, its output will be delayed by this amount. If the gap between two successive data points exceeds this amount, there will be an observable hitch.

    • verbose name: Online Lookahead
    • default value: 2
    • port type: FloatPort
    • value type: float (can be None)
  • order
    Polynomial degree for spline interpolation. This is alternative to the values for 'kind', and orders 0 to 3 are equivalent to zero, linear, quadratic, and cubic -- kind should be set to 'specify_order'.

    • verbose name: Spline Order
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • assume_sorted
    Assume that the data are sorted along the desired axis. It is slower to set this to False, but will work if e.g., interpolating data with jittery time stamps.

    • verbose name: Assume Sorted
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • allow_extrapolation
    You probably shouldn't use this. Extrapolation is only warranted in extreme circumstances where the data being interpolated/extrapolated is highly smoothed and the extrapolated samples are within 1/fs sec away. This might be the case if e.g. you are trying to align two time series after already using SelectRange to slice their axes to the minimum overlap.

    • verbose name: Allow Extrapolation
    • 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)

InterpolateGaps

Finds and interpolate gaps in data.

Automatically finds gaps, ets a new timestamp using sampling rate (if provided) or determines sampling rate from input data, then interpolates data to new timestamps. Optionally this node can fill in missing data points with NaN values instead of interpolation. Currently only does 1-d interpolation on offline chunks for timeaxes.

More Info...

Version 1.0.1

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • kind
    Specifies the kind of interpolation. ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order. If specify_order is selected then the order param must also be specified.

    • verbose name: Kind Of Interpolation
    • default value: linear
    • port type: EnumPort
    • value type: str (can be None)
  • order
    Order parameter if kind is 'specify_order'.

    • verbose name: Order Parameter (Kind Specify_order Only)
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • srate
    Set the desired sampling rate. If none is specified the sampling rate is determined the rate previously set, or if no rate is set then it will calculate the rate based on the median timestamps'.

    • verbose name: Sampling Rate
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • use_markers
    Check this box if you want to use marker times for start and/or end points. This is desirable if your marker endpoints extend beyond the data timestamps because of missing data.

    • verbose name: Use Markers For Endpoints
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • marker_start
    Specify marker name (as string) to determine starting timepoint.

    • verbose name: Marker Startpoint
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • marker_end
    Specify marker name (as string) to determine ending timepoint.

    • verbose name: Marker Endpoint
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • allow_extrapolation
    You probably shouldn't use this. Extrapolation is only warranted in extreme circumstances where the data being interpolated/extrapolated is highly smoothed and the extrapolated samples are within 1/fs sec away. This might be the case if e.g. you are trying to align two time series after already using SelectRange to slice their axes to the minimum overlap.

    • verbose name: Allow Extrapolation
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • fill_nans
    Checking this box will not use interpolation, but instead fill missing data points with NaN ("not a number") values.

    • verbose name: Insert Nans
    • 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)

MSeq

Generates m sequence time series for the given order (m).

The length of sequence is L = 2^m-1. It can repeat each element of sequence r times. If the parameter m-repeat is set to zero, the m sequence is not going to be repeated. The sequence can be circularly shifted for the given values in parameter m_shift.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Output reference signals

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • m_order
    Sequence order.

    • verbose name: M Order
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • seq_shift
    The number of bits that the sequence is shifted.

    • verbose name: Seq Shift
    • default value: [0, 2, 4, 6]
    • port type: ListPort
    • value type: list (can be None)
  • bit_repeat
    The number of times that each element is repeated.

    • verbose name: Bit Repeat
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • repeat_unit
    Unit in which the sequence is shifted.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: str (can be None)
  • seq_repeat_or_length
    The number of times that the sequence is repeated. If the Repeat unit is repeats, the sequence is repeated by the given number. If the Repeat unit is seconds, the sequence is repeated to fill the time length with the given sampling frequency. If the Repeat unit is samples, the sequence is going to have that many samples

    • verbose name: Seq Repeat Or Length
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • fs
    The sampling frequency. This is only used if Repeat unit is time.

    • verbose name: Fs
    • default value: 500
    • port type: FloatPort
    • value type: float (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)

MedianFilter

Calculate a sliding-window median over the data.

This node requires that the data is a continuous time series (that is, has a time axis and is not segmented). The node works both with streaming and offline data, and replaces each value by the median of the k preceding input samples (where k is window_len worth of samples). This filter is a robust alternative to the MovingAverage filter, and can be used to e.g., track the signal drift or offset in the presence of artifacts.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_len
    Window length for median calculation. In seconds.

    • verbose name: Window Length
    • default value: 1
    • port type: FloatPort
    • value type: float (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)

MovingAverage

Smooth the signal using a moving average.

Each output sample is the average of the k input samples up to that sample. The window length can be given in seconds or samples. This filter is much more CPU-efficient for smoothing than using an FIR or IIR filter, especially for long window lengths. This filter maintains internal state to smooth seamlessly across chunk boundaries.

More Info...

Version 1.2.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis to average over. Rarely used. If you select instance, then successive trials will be averaged in a moving window, and the window length will be given in trials (choosing 'seconds' as the unit has no effect).

    • verbose name: Axis To Average Over
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • order
    Window length (order) of the filter. This is the number of samples or seconds (see unit parameter) over which we average.

    • verbose name: Window Length
    • default value: 100
    • port type: FloatPort
    • value type: float (can be None)
  • order_unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • ignore_nans
    If activated, NaN values are ignored as in nanmean.

    • verbose name: Ignore Nan Samples
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • output_nans
    If enabled, values that were NaN in the input data will be set to NaN in the output.

    • verbose name: Output Nans
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • subtract
    Subtract from data.

    • verbose name: Subtract From Data
    • 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)

MovingWindow

Output a moving window of a streaming time series.

This node is meant to be used in online processing only. On every tick, this node outputs the last window_length seconds of the signal.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_length
    Sliding window length. A longer window will yield a better estimate, but the spectrum will change more slowly and will also react more slowly to changes. Typical settings for EEG phenomena are 0.5 to 5 seconds, but for very slowly (or rapidly) changing brain dynamics, longer (or shorter) windows may be used.

    • verbose name: Sliding Window Length
    • default value: 2
    • port type: FloatPort
    • value type: float (can be None)
  • unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: str (can be None)
  • flag_as_offline
    Flag output as offline data.

    • verbose name: Flag As Offline
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • verbose
    Verbose output.

    • verbose name: Verbose
    • 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)

PeakAmplitude

Find the amplitude of the tallest peak along an axis.

This node finds the largest element along an axis and outputs the value of that element along the axis (and if the data has other axes, e.g., channels, then for each channel/etc the amplitude is computed separately). One can optionally find the smallest element (i.e., negative peak), or find either the positive or negative peak (whichever has the greater absolute value). The chosen axis will be replaced by a one-element feature axis with the name 'peak_amplitude'.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which to find the peak. This axis will drop out of the data and be replaced by a one-element feature axis.

    • verbose name: Find Peak Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • negative
    Apply to negative peaks. If checked, the smallest element will be searched, instead of the largest.

    • verbose name: Find Negative Peaks
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • direction
    Find the positive peaks, negative peaks, or either.

    • verbose name: Direction
    • default value: positive
    • 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)

PeakFindingContour

Find all peaks in the given data along a given axis.

This method uses a contour-based approach that allows for multiple criteria to be used to constrain what is considered a peak. By default, all criteria are inactive, except for the basic requirement that a peak sample must be higher than its two neighbors. By default, the offset is returned as the index of the element, counting from zero for the first element. However, in the special case that the node is applied over the time axis, it is possible to measure the offset instead in seconds, and one may also look up the position in seconds from the time axis (e.g., relative to whatever is 0 in the time axis). One can also optionally account for the delay of previous filter nodes, to the extent that the data is annotated with it.

Version 0.3.0

Ports/Properties

  • 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)
  • indata
    Input data.

    • verbose name: Indata
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • latencies
    Output peak latencies.

    • verbose name: Latencies
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • amplitudes
    Output peak amplitudes.

    • verbose name: Amplitudes
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • axis
    Axis along which to find the peak. This axis will drop out of the data and be replaced by a one-element feature axis.

    • verbose name: Find Peak Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • negative
    Apply to negative peaks. If checked, the smallest element will be searched, instead of the largest.

    • verbose name: Find Negative Peaks
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • unit
    Unit of measurement to use, depending on axis that the peak is searched along. Using seconds here works only if the operation is performed along the time axis, and if the axis has a sampling rate set.

    • verbose name: Unit Of Measurement
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • min_distance
    Minimum horizontal distance between any two peaks. If there are two peaks within this distance from each other, the smaller one will be ignored. Given in the selected unit.

    • verbose name: Min Distance Between Peaks
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_count
    Maximum number of peaks to find. If more peaks are found, the ones with the highest amplitude will be kept.

    • verbose name: Max Count
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • min_threshold
    Minimum vertical distance between a peak and its neighboring samples. In signal units.

    • verbose name: Min Threshold
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • min_prominence
    Minimum prominence of a peak. The prominence is the vertical distance between the peak and the higher one of its left or right baseline. The baseline is the lowest point between the peak and the adjacent higher peak or edge of the signal. In signal units.

    • verbose name: Min Prominence
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • min_width
    Minimum width of a peak. The width is measured at a specific fraction (e.g., 0.5) of the peak's prominence subtracted from its peak height. Given in the selected unit.

    • verbose name: Min Width
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • min_height
    Minimum absolute height of peak. This is measured from 0. In signal units.

    • verbose name: Min Height
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • min_plateau
    Minimum size of the flat top of the peak. Given in the selected unit.

    • verbose name: Min Plateau Size
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_threshold
    Maximum vertical distance between a peak and its neighboring samples.

    • verbose name: Max Threshold
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_height
    Maximum absolute height of peak. This is measured from 0.

    • verbose name: Max Height
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_prominence
    Maximum prominence of a peak. See min_prominence for the definition.

    • verbose name: Max Prominence
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_width
    Maximum width of a peak. See min_width for the definition.

    • verbose name: Max Width
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • max_plateau
    Maximum size of the flat top of the peak.

    • verbose name: Max Plateau Size
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • search_width
    Width of the search window. When computing the prominence of a peak or its width, the method will stop at this width. This is mostly helpful for improving the compute time when processing large data.

    • verbose name: Search Width
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • relative_height
    Relative height of the peak. This is the fraction of the prominence that is subtracted from the peak height when measuring the width. Only used if min/max width is given.

    • verbose name: Relative Height
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • subtract_filter_delay
    Subtract filter delay (time axis only). Note that this is most reliable when used with only linear-phase filters (e.g., FIR filter without minimum phase option), since otherwise the delay will depend on the frequency content of the signal.

    • verbose name: Subtract Filter Delay
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • account_for_time_axis
    Look up latency from the time axis. If unchecked, the lantency will be computed relative to the beginning of the data segment, but if checked, it will be relative to whatever is 0.0 in the time axis (and would even work with irregularly sampled data).

    • verbose name: Respect Time Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • update_on_streaming
    Update on streaming data. If enabled (default), then this node will update its output measure on every chunk, whether it is marked as streaming or not. If False, then it will only update on non-streaming, chunks, such as calibration data.

    • verbose name: Update On Streaming Data
    • 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)

PeakFindingWavelet

Find all peaks in the given data along a given axis.

This method uses a continuous wavelet based approach to be able to identify multiple peaks of various shapes and sizes. Note that there is also an alternative method that is based on contours, which may be easier to use or give more predictable results. By default, the offset is returned as the index of the element, counting from zero for the first element. However, in the special case that the node is applied over the time axis, it is possible to measure the offset instead in seconds, and one may also look up the position in seconds from the time axis (e.g., relative to whatever is 0 in the time axis). One can also optionally account for the delay of previous filter nodes, to the extent that the data is annotated with it.

Version 1.0.2

Ports/Properties

  • 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)
  • indata
    Input data.

    • verbose name: Indata
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • latencies
    Output peak latencies.

    • verbose name: Latencies
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • amplitudes
    Output peak amplitudes.

    • verbose name: Amplitudes
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • axis
    Axis along which to find the peak. This axis will drop out of the data and be replaced by a one-element feature axis.

    • verbose name: Find Peak Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • negative
    Apply to negative peaks. If checked, the smallest element will be searched, instead of the largest.

    • verbose name: Find Negative Peaks
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • unit
    Unit of measurement to use, depending on axis that the peak is searched along. Using seconds here works only if the operation is performed along the time axis, and if the axis has a sampling rate set.

    • verbose name: Unit Of Measurement
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • wavelet
    Type of wavelet to use for matching.

    • verbose name: Wavelet
    • default value: ricker
    • port type: EnumPort
    • value type: str (can be None)
  • min_width
    Minimum peak width. Expressed in the selected unit of measurement (seconds or samples). For other units (e.g., Hz), this is still measured in samples.

    • verbose name: Min Width
    • default value: 5
    • port type: FloatPort
    • value type: float (can be None)
  • max_width
    Maximum peak width. Expressed in the selected unit of measurement (seconds or samples). For other units (e.g., Hz), this is still measured in samples.

    • verbose name: Max Width
    • default value: 15
    • port type: FloatPort
    • value type: float (can be None)
  • num_widths
    Number of intermediate widths to consider. The algorithm will separately scan for a number of intermediate widths between min_width and max_with. Choosing a finer resolution here may improve the accuracy of peak finding, but at increased computational cost.

    • verbose name: Num Widths
    • default value: 10
    • port type: IntPort
    • value type: int (can be None)
  • max_count
    Maximum number of peaks to find. If more peaks are found, the ones with the highest amplitude will be kept.

    • verbose name: Max Count
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • subtract_filter_delay
    Subtract filter delay (time axis only). Note that this is most reliable when used with only linear-phase filters (e.g., FIR filter without minimum phase option), since otherwise the delay will depend on the frequency content of the signal.

    • verbose name: Subtract Filter Delay
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • account_for_time_axis
    Look up latency from the time axis. If unchecked, the lantency will be computed relative to the beginning of the data segment, but if checked, it will be relative to whatever is 0.0 in the time axis (and would even work with irregularly sampled data).

    • verbose name: Respect Time Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • update_on_streaming
    Update on streaming data. If enabled (default), then this node will update its output measure on every chunk, whether it is marked as streaming or not. If False, then it will only update on non-streaming, chunks, such as calibration data.

    • verbose name: Update On Streaming Data
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • min_snr
    Minimum signal-to-noise ratio.

    • verbose name: Min Snr
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • noise_percentile
    Percentile of where the noise floor lies.

    • verbose name: Noise Percentile
    • default value: 10
    • port type: FloatPort
    • value type: float (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)

PeakLatency

Find the latency or offset of the tallest peak along an axis.

This node finds the largest element along an axis and outputs the offset/shift of that element along the axis (and if the data has other axes, e.g., channels, then for each channel/etc the offset is computed separately). One can optionally also find the smallest element (i.e., negative peak). The chosen axis will generally be replaced by a one-element feature axis. By default, the offset is returned as the index of the element, counting from zero for the first element. However, in the special case that the node is applied over the time axis, it is possible to measure the offset instead in seconds, and one may also look up the position in seconds from the time axis (e.g., relative to whatever is 0 in the time axis). One can also optionally account for the delay of previous filter nodes, to the extent that the data is annotated with it.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which to find the peak. This axis will drop out of the data and be replaced by a one-element feature axis.

    • verbose name: Find Peak Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • negative
    Apply to negative peaks. If checked, the smallest element will be searched, instead of the largest.

    • verbose name: Find Negative Peaks
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • unit
    Output unit, depending on axis that the peak is searched along. Using seconds here works only if the operation is performed along the time axis, and if the axis has a sampling rate set.

    • verbose name: Unit Of Measurement
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • subtract_filter_delay
    Subtract filter delay (time axis only). Note that this is most reliable when used with only linear-phase filters (e.g., FIR filter without minimum phase option), since otherwise the delay will depend on the frequency content of the signal.

    • verbose name: Subtract Filter Delay
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • account_for_time_axis
    Look up latency from the time axis. If unchecked, the lantency will be computed relative to the beginning of the data segment, but if checked, it will be relative to whatever is 0.0 in the time axis (and would even work with irregularly sampled data).

    • verbose name: Account For Time Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • update_on_streaming
    Update on streaming data. If enabled (default), then this node will update its output measure on every chunk, whether it is marked as streaming or not. If False, then it will only update on non-streaming, chunks, such as calibration data.

    • verbose name: Update On Streaming Data
    • 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)

PruneFlatlineChannels

Prune channels that flat-line for extended periods of time in the calibration data.

Note that it is enough for a channel to flat-line for only a few seconds at a time to be considered a flat-lining channel (since such channels can cause adaptive filters to break). If this filter is used on streaming data and has not yet been calibrated, then it will first buffer n seconds of calibration data to determine some statistics, before any output is produced.

Version 1.0.2

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • diagnostic
    Diagnostic Information.

    • verbose name: Diagnostic
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • max_duration
    Maximum allowed flat-line duration, in seconds. If a channel has a longer flatline than this, it will be removed. In seconds. You can pass infinity or a very large number to require that a channel must be flat the whole time.

    • verbose name: Max Duration
    • default value: 5
    • port type: FloatPort
    • value type: float (can be None)
  • max_jitter_rel
    Allowed relative jitter. This is relative to the absolute signal value. If a channel has lower jitter than this in a time window, it is considered a flatline.

    • verbose name: Max Relative Jitter
    • default value: 1e-05
    • port type: FloatPort
    • value type: float (can be None)
  • max_jitter_abs
    Allowed absolute jitter. If a channel has lower jitter than this in a time window, it is considered a flatline.

    • verbose name: Max Absolute Jitter
    • default value: 1e-05
    • port type: FloatPort
    • value type: float (can be None)
  • init_on
    Time range to calibrate (initialize) the filter on. This parameter can take a single number or two numbers. In case of streaming data, this should always be a single number, representing the number of seconds to buffer from the start of the data, for calibration. In case of offline (recorded) data, this can either be a single number, in which case it represents the window of time in seconds from the beginning of the recording to be used; or, it can be a list of two numbers, in which case this refers to a range of data in seconds, relative to the start of the data, to be used for calibration. The latter allows you to calibrate on data other than the first segment of the data (i.e., if known to be bad), or to avoid running the (fairly expensive) filter on a very long file or on each fold of a cross-validation. Note that a value of 0 here will in the case of offline data be interpreted as the entire file, and in the case of streaming data will raise an error.

    • verbose name: Calibration Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • calib_seconds
    Amount of data, in seconds, to buffer for calibration on streaming data. For offline (non-streaming) data use the "calibration range" (init_on) parameter instead.

    • verbose name: Calib Seconds
    • default value: 20
    • port type: IntPort
    • value type: int (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)

QuantileStandardization

Standardize data by converting into quantiles relative to a sliding window.

If data were perfectly Gaussian-distributed, a similar result could be achieved by z-scoring the data in a rectangular sliding window and then applying a sigmoid transform with a slope that is tuned to yield an approximately uniform output distribution. This node can also be used in offline mode in which case the entire packet is used for standardization.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_len
    Window length (in seconds) for robustly tracking the signal drift. Use 0 to standardize against the entire packet (for offline use only).

    • verbose name: Window Length
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • axis
    Axis to standardize over. Instance can only be used in offline mode (requires window length=0).

    • verbose name: Axis To Standardize Over
    • default value: time
    • port type: ComboPort
    • 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)

RectangularMovingWindowStandardization

Standardize the signal in a sliding rectangular window.

This node estimates the running mean and running standard deviation in a rectangular window (that is, with equal weighting). Then, each sample is converted to z scores by subtracting the running mean and dividing by the running standard deviation, which are estimated from the k samples prior to that sample. This filter maintains internal state to work seamlessly across chunk boundaries. On the first window length samples, the result will not yet be standardized fully since the filter first needs to collect sufficient data.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • means
    Estimated averages. This is an additional diagnostic.

    • verbose name: Means
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • stddevs
    Estimated standard deviations. This is an additioanl diagnostic.

    • verbose name: Stddevs
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • window_length
    Length of sliding window. This is the window length over which the variance of the signal is estimated.

    • verbose name: Window Length
    • default value: 30
    • port type: FloatPort
    • value type: float (can be None)
  • window_length_unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: str (can be None)
  • ignore_nans
    If activated the channels containing nan values are ignored.

    • verbose name: Ignore Channels With Nan Values
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • from_to_stream
    Apply scaling from a stream to another stream.

    • verbose name: From To Stream
    • default value: None
    • port type: DictPort
    • value type: dict (can be None)
  • epsilon
    Smallest possible standard deviation, to prevent division by zero.

    • verbose name: Epsilon
    • default value: 1e-15
    • port type: FloatPort
    • value type: float (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)

RefSignals

Generates sinusoidal reference signals with given frequencies.

A sampling rate (fs in Hz), the number of harmonics, and length of signals (ref_len in sec) should be specified as the node parameters.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Output reference signals

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • fs
    Sampling frequency (Hz).

    • verbose name: Fs
    • default value: 500
    • port type: FloatPort
    • value type: float (can be None)
  • freqs
    Frequencies of the sinusoidal reference signals in Hz.

    • verbose name: Freqs
    • default value: [5, 10, 15, 20]
    • port type: ListPort
    • value type: list (can be None)
  • ref_len
    Length of reference signals (sec).

    • verbose name: Ref Len
    • default value: 5
    • port type: FloatPort
    • value type: float (can be None)
  • num_harmonics
    Number of harmonics for each sinusoidal reference signal.

    • verbose name: Num Harmonics
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • ouput_stream_name
    The name of output stream.

    • verbose name: Output Stream Name
    • default value: ref_signals
    • 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)

Rereferencing

Subtract the average of some reference data.

The two most common use cases of this are a) re-referencing of EEG/EMG, where one or more channels are averaged, and the result is subtracted from all channels, and b) baseline removal, where the average in some baseline time window is taken, and subtracted from the whole time period. The range can be given either as a list of values (e.g., indices or channel names in single quotes), formatted as [value1, value2, ...], or as a range expression of the form start:stop, where all successive indices beginning with start and up to one prior to stop are included. This node also supports robust averaging using the median, which can be useful for robust re-referencing, where one or more channels are particularly noisy. Alternatively, instead of specifying a data range from the current data packet to use as reference, you can use data from another packet fed into this node through the reference_data port. This reference data must have the same shape as the data to be subtracted from except along the axis to be rereferenced.

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • reference_data
    Reference data to subtract

    • verbose name: Reference Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • axis
    Axis along which to take the reference or baseline.

    • verbose name: Select Reference Along Axis
    • default value: space
    • port type: ComboPort
    • value type: str (can be None)
  • reference_range
    Data range to use as reference / baseline. When the space axis is used (standard re-referencing), this is typically a channel range, e.g. ':' or ['TP8', 'TP9'] or 'Chn1':'Chn10', and the reference unit is set to 'names'. When the time axis is used (baseline removal), this is typically the baseline time window in seconds, e.g., -0.2:0.0. If [] (empty list), the data is not rereferenced.

    • verbose name: Reference Selection
    • default value: :
    • port type: Port
    • value type: object (can be None)
  • reference_unit
    Unit in which the reference range is given. Depending on the axis, different units are applicable, e.g., names for space, seconds for time, indices for any axis.

    • verbose name: Unit Of Measurement For Selection
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)
  • estimator
    Estimator to use. Mean is the standard choice, median is a robust alternative (tolerates, e.g., bad channels) and trim_mean is a robust alternative which does not inlcude the outliers in the mean calculation.

    • verbose name: Use Estimator
    • default value: mean
    • port type: EnumPort
    • value type: str (can be None)
  • cut_prop
    Fraction of the outliers to cut off for trim_mean option.

    • verbose name: Proportion Cutoff For Trim Mean Option
    • default value: 0.1
    • port type: FloatPort
    • value type: float (can be None)
  • use_separate_reference
    If checked, the range property will be ignored and the data in the reference_data port will be used instead. The reference_data tensor must include the axis selected above, and be the same size as the data except along the selected axis.

    • verbose name: Use Separate Reference
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • verbose
    Set to false to suppress warnings that rereferencing was not performed (no reference data, data is wrong shape, etc.) .

    • verbose name: Verbose
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_nans
    Ignore nan values in the data.

    • verbose name: Ignore Nans
    • 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)

Resample

Resample signal to a given sampling rate.

This uses a polyphase implementation. This node currently only supports resampling during offline processing, and uses a zero-phase FIR filter (that is, it is not strictly causal, but the filter is usually quite short).

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • rate
    Target sampling rate.

    • verbose name: Rate
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • kaiser_param
    Kaiser window parameter.

    • verbose name: Kaiser Param
    • default value: 5.0
    • port type: FloatPort
    • value type: float (can be None)
  • padding
    Padding mode of data. Data at both ends is extended as follows: constant: signal continues at constant zero level; line: signal continues at same level; smooth: signal continues as linear extension of last two points; reflect: mirror signal at end; antireflect: antisymmetric reflection; symmetric/antisymmetric: similarly.

    • verbose name: Input Edge Padding
    • default value: antireflect
    • 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)

RobustRectangularStandardization

Robustly standardize the signal in a sliding rectangular window.

This node estimates the running median and running median absolute deviation in a rectangular window (that is, with equal weighting for all samples in the window). Then, each sample is converted to robust z scores by subtracting the running median and dividing by the robust standard deviation, estimated from the median absolute deviation, both of which are estimated from the k samples prior to that sample. This filter maintains internal state to work seamlessly across chunk boundaries. On the first window length samples, the result will not yet be standardized fully since the filter first needs to collect sufficient data.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_len
    Window length for standardization. In seconds.

    • verbose name: Window Len
    • default value: 30
    • port type: FloatPort
    • value type: float (can be None)
  • distribution
    Type of distribution of the data. If gaussian, we assume tha the data is centered around 0. If half-normal, then we assume that the data is positive, and that we standardize it such that the minimum value is 0.

    • verbose name: Distribution
    • default value: gaussian
    • port type: EnumPort
    • value type: str (can be None)
  • use_caching
    Use caching. Only applicable on offline data.

    • verbose name: Use Caching
    • 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)

SavitzkyGolayFilter

Apply a Savitzky-Golay filter to an array.

This is a 1-d filter and will be applied only to the axis specified in filt_axis.

More Info...

Version 0.8.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_length
    The length of the filter window (i.e . the number of coefficients). window_length must be a positive odd integer.

    • verbose name: Sliding Window Length
    • default value: 11
    • port type: FloatPort
    • value type: float (can be None)
  • unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: samples
    • port type: EnumPort
    • value type: str (can be None)
  • polyorder
    The order of the polynomial used to fit the samples. polyorder must be less than window_length (in samples).

    • verbose name: Order Of Polynomial
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • deriv
    The order of the derivative to compute. This must be a nonnegative integer. The default is 0, which means to filter the data without differentiating.

    • verbose name: Deriv
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • filt_axis
    The axis to apply the filter to. This will be the first axis of the specified type, or alternatively, a custom_label can be specified in format "myaxis.mylabel" to specifically designate the axis to which it will be applied.

    • verbose name: Filt Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • mode
    This determines the type of extension to use for the padded signal to which the filter is applied. When mode is ‘constant’, the padding value is given by the padding value. When the ‘interp’ mode is selected (the default), no extension is used. Instead, a degree polyorder polynomial is fit to the last window_length values of the edges, and this polynomial is used to evaluate the last window_length // 2 output values.

    • verbose name: Edge Padding
    • default value: interp
    • port type: EnumPort
    • value type: str (can be None)
  • cval
    Value to fill past the edges of the input if mode is ‘constant’.

    • verbose name: Padding Value (If Constant)
    • default value: 0.0
    • port type: FloatPort
    • value type: float (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)

ShiftedWindows

Extract overlapped windows from the given time series.

Note that this node is currently only usable in offline mode. In the output the time axis is replaced by two axes, an instance axis called timewindow which indicates the average time of the window and the time axis which indicates the relative time in the window with the reference to the middle time-point. If remove_gaps is True, all windows which overlap gaps in the time-sequence will be removed.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • win_len
    Sliding window length. A longer window will yield a better estimate, but the spectrum will change more slowly and will also react more slowly to changes. Typical settings for EEG phenomena are 0.5 to 5 seconds, but for very slowly (or rapidly) changing brain dynamics, longer (or shorter) windows may be used.

    • verbose name: Sliding Window Length
    • default value: 2
    • port type: FloatPort
    • value type: float (can be None)
  • offset_len
    Amount of shift or offset between the beginning of the time window segments. If this value is not set, it is assumed that the overlap length is half of the window length, corresponding to 50% overlap.

    • verbose name: Offset Length
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • unit
    Unit in which the window and offset length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: str (can be None)
  • remove_gaps
    Remove all windows which overlap gaps in the data.

    • verbose name: Remove Gaps
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • max_gap_length
    Maximum length of time-stamp gaps that are allowed in segments. If a gap between successive samples is larger than this duration in seconds, then the affected segment is not extracted. Optional. Note that if your time stamps are jittered, this will generate a lot of false positives unless you use a very generous cutoff. You can use the DejitterTimestamps node early during your processing to fix that.

    • verbose name: Max Gap Length
    • default value: 0.2
    • port type: FloatPort
    • value type: float (can be None)
  • timestamp_origin
    The origin of the timestamp for each window, sourced from the original timestamps for that window. mean: Take the average time within each window first: Take the first time within each window.

    • verbose name: Timestamp Origin
    • default value: mean
    • port type: EnumPort
    • value type: str (can be None)
  • create_axis
    Type of axis to create to index the windows. The axis will by default carry the custom label "timewindow", unless the axis has a label defined in the axis definition string, as in time.mylabel.

    • verbose name: Create Axis
    • default value: instance
    • port type: ComboPort
    • 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)

SignalWhitening

Perform a whitening (sphering) transform of the signal.

This can yield better data alignment across subjects and studies. If this filter is used on streaming data and has not yet been calibrated, then it will first buffer n seconds of calibration data to determine some statistics, before any output is produced.

Version 1.2.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • regularization
    Shrinkage regularization strength. Larger values yield more conservative (but less adapted) whitening transforms. Typically only a very small value (e.g., 0.001) is necessary to avoid degenerate solutions.

    • verbose name: Regularization Strength
    • default value: 0
    • port type: FloatPort
    • value type: float (can be None)
  • robust
    Perform robust estimation.

    • verbose name: Robust
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • init_on
    Time range to calibrate (initialize) the filter on. This parameter can take a single number or two numbers. In case of streaming data, this should always be a single number, representing the number of seconds to buffer from the start of the data, for calibration. In case of offline (recorded) data, this can either be a single number, in which case it represents the window of time in seconds from the beginning of the recording to be used; or, it can be a list of two numbers, in which case this refers to a range of data in seconds, relative to the start of the data, to be used for calibration. The latter allows you to calibrate on data other than the first segment of the data (i.e., if known to be bad), or to avoid running the (fairly expensive) filter on a very long file or on each fold of a cross-validation. Note that a value of 0 here will in the case of offline data be interpreted as the entire file, and in the case of streaming data will raise an error.

    • verbose name: Calibration Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • calib_seconds
    Amount of data, in seconds, to buffer for calibration on streaming data. For offline (non-streaming) data use the "calibration range" (init_on) parameter instead.

    • verbose name: Calib Seconds
    • default value: 54
    • port type: IntPort
    • value type: int (can be None)
  • emit_calib_data
    Emit the data buffer that was used for calibration, after calibration is complete, in a single chunk. If False, this filter will discard the calibration data. Since this chunk can be quite long, it is often preferable to discard it in a real-time pipeline, but if subsequent nodes need to see the processed calibration data to calibrate themselves (quite likely the case), it needs to be emitted.

    • verbose name: Emit Calibration Data
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • subtract_mean
    Subtract the mean from the data.

    • verbose name: Subtract Mean
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • riemannian
    Perform Riemannian average. This will take a riemannian average over successive covariance matrix estimates.

    • verbose name: Riemannian
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • block_size
    Block size. Used for the riemannian method, as well as the robust method. For riemannian, this should be at least on the order of the number of channels, and the lower it is, the more regularization is needed.

    • verbose name: Block Size
    • default value: 10
    • port type: IntPort
    • value type: int (can be None)
  • use_pseudoinverse
    Use pseudoinverse method. This will work if data is rank-deficient even when the regularization parameter is set to 0.

    • verbose name: Use Pseudoinverse
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • store_matrices
    Store transform matrices in packet properties.

    • verbose name: Store Matrices
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • offline_use_all
    If init_on is specified and processing offline data, then setting this True will use all data to calculate the whitening transform. The data will be processed chunk-by-chunk with chunk size and the first chunk determined by init_on.

    • verbose name: Adapt On All Data If Non-Streaming
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • offline_cores
    Number of cores to use to calculation covariance matrices of chunked input, when offline_use_all is set. Set to 0 or 1 to disable multiprocessing, set to a larger integer to use that many, or set to -1 to use all available CPUs.

    • verbose name: Num_cores (If Non-Streaming)
    • default value: 1
    • port type: IntPort
    • value type: int (can be None)
  • segsize
    Set the total number of samples (space x time) per segment of the output signal on which the spatial filter is applied. 0 (default) will use all samples, but this may run out of memory for long signals. Any other positive value will be rounded up to the next factor of the time axis length. Set to -1 to skip applying the spatial filter altogether, useful if all that is desired is the sphering and covariance matrices.

    • verbose name: Segsize
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • constrain
    Constrain whitening. This is currently mostly to mimic other forms of scale standardization for comparison purposes. none applies no constraints and results in full (regular) whitening. diag constrains the covariance matrix to a diagonal matrix and results in per-channel scaling. Univariate additionally locks all channels to receive the same scale, and is thus equivalent to multiplying by a scalar.

    • verbose name: Constrain
    • default value: none
    • port type: EnumPort
    • value type: str (can be None)
  • ignore_resets
    Ignore state resets.

    • verbose name: Ignore Resets
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • initialize_once
    Initialize (adapt state parameters) only once. If False, this node will recalibrate itself on any qualifying chunk (based on the setting of adapt on streaming chunks).

    • verbose name: Adapt Only Once
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • use_caching
    Enable caching.

    • verbose name: Use Caching
    • 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)

SpectrallyWhitenTimeSeries

IIR filter a time series to produce a flat spectrum.

Coefficients are calculated from the calibration data to be the AR coefficients that reconstruct a white noise signal from the calibration signal. Note that a different filter is used for each feature (i.e. each channel), thus there are variable phase delays across features, destroying connectivity information. This filter should only be used in specific applications when you are fully aware of these consequences. One such application is when extracting broadband power from ECoG data for the purpose of classification of data segments.

Version 0.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • order
    Yule Walker AR order. This determines the complexity of the spectrum that can be accounted for.

    • verbose name: Model Order
    • default value: 10
    • port type: IntPort
    • value type: int (can be None)
  • init_on
    Time range to calibrate (initialize) the filter on. This parameter can take a single number or two numbers. In case of streaming data, this should always be a single number, representing the number of seconds to buffer from the start of the data for calibration. In case of offline (recorded) data, this can either be a single number, in which case it represents the window of time in seconds from the beginning of the recording to be used; or, it can be a list of two numbers, in which case this refers to a range of data in seconds, relative to the start of the data, to be used for calibration. The latter allows you to calibrate on data other than the first segment of the data (i.e., if known to be bad), or to avoid running the (fairly expensive) filter on a very long file or on each fold of a cross-validation. Note that a value of 0 here will in the case of offline data be interpreted as the entire file, and in the case of streaming data will raise an error.

    • verbose name: Calibration Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • calib_seconds
    Amount of data, in seconds, to buffer for calibration on streaming data, used to compute its filter coefficients before any output is produced. For offline (non-streaming) data use the "calibration range" (init_on) parameter instead.

    • verbose name: Calib Seconds
    • default value: 45
    • port type: IntPort
    • value type: int (can be None)
  • emit_calib_data
    Emit the data buffer that was used for calibration, after calibration is complete, in a single chunk. If False, this filter will discard the calibration data. Since this chunk can be quite long, it is often preferable to discard it in a real-time pipeline, but if subsequent nodes need to see the processed calibration data to calibrate themselves (quite likely the case), it needs to be emitted.

    • verbose name: Emit Calibration Data
    • 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)

TRCA

Perform Task-Related Component Analysis (TRCA) of the input data.

The shape of the input is [#channels x #time-points x #trials].

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • 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)

UnitNormalization

Normalize the data along an axis by dividing each data point by the sum of all data points (within each row), or the sum of the squares of all data points.

(Negative values are not made absolute.)

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which to perform the unit normalization.

    • verbose name: Axis
    • default value: frequency
    • port type: ComboPort
    • value type: str (can be None)
  • normalization
    Type of normalization: divide by the sum of all values of each row of the axis, or divide by the sum of all squares of the values in each row along the axis.

    • verbose name: Normalization
    • default value: sum
    • 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)

WindowFunction

Apply a window function to the given data along some axis.

This node will basically multiply a window function (e.g., a bell curve) element-by-element with the data along that axis. This can be used to get a soft weighting of different places in the data, instead of a sharp-edged data range. The most common use case of this node is to apply it along the time axis on data that has previously been segmented using the Segmentation node. For more information on the different window functions and their tradeoffs, follow the below "more..." link.

More Info...

Version 1.1.0

Ports/Properties

  • 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)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • axis
    Axis along which the window function should be applied. The window will be multiplied element-by-element with the data along the axis.

    • verbose name: Apply Window Function Along Axis
    • default value: time
    • port type: ComboPort
    • value type: str (can be None)
  • func
    Type of window function to use. Different functions have different spectral and temporal localization characteristics (see documentation of the node). One of the simplest well-behaved smooth windows is the Hann window (the default).

    • verbose name: Window Function
    • default value: hann
    • port type: EnumPort
    • value type: str (can be None)
  • param
    Window parameter. Some of the window functions are parametric, and in those cases this parameter must be specified. Needed for kaiser, gaussian, slepian, and chebwin.

    • verbose name: Window Parameter (Parametric Windows Only)
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • apply_to_range
    The range of data to select along the desired axis. The simplest form is a list of indices (with unit set to indices), which must be formatted as in [0,1,2,5,6] (indices count from 0). Another option is to use an inclusive range of the form 3...4 (inclusive means that both 3 and 4 are included in the range). And finally, you can also generally use Python's "slice" syntax, as in 0: 3 -- but this is more error prone as the range is half-open, that is, it does not include the last value of the slice (so the previous slice gives the same result as using the indices [0,1,2]). In slices, you can also use negative numbers, which count from the end, or you can omit the value before or after the :, which is then assumed to stand for the first element (if the value before the colon is omitted) or the last element (if the value after the colon is omitted). For instance, -3: retains the last 3 items along te axis. You can also give these values in units other than array indices, such as in seconds, Hz, channel names, and so on. See Unit for the most common examples.

    • verbose name: Apply To Range
    • default value: :
    • port type: Port
    • value type: object (can be None)
  • range_unit
    Unit in which the selection is given. Depending on the axis, different units are applicable. For axes such as time, frequency, or space, you usually want to use not array indices but other units of measurement: for instance, for the time axis, you generally want to set the unit to 'seconds' -- then, a range like 10:50 is interpreted as "all the data starting at 10 seconds and up to (but not including) 50 seconds". For the frequency axis, the most useful unit would be 'Hz'. For channels, it is often desirable to be able to give channel names, e.g., ['C3','C4',CZ'], or 'A1':'A32', in which case you should set the unit to 'names'. If 'auto' then the most commonly used unit for the given axis is used (names for space and feature, seconds for time, Hz for frequency, etc.)

    • verbose name: Unit Of Measurement For Range
    • default value: indices
    • 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)