Module: diagnostics

Diagnostic output.

These nodes allow you to print diagnostics and debug your pipelines or your code, and offer feature such as sanity-checking the data, or printing node properties.

AddSampleCounter

Add a sample counter channel to the signal.

This node can sometimes be useful as a debugging aid -- it will simply replace the content of the first channel along time with a sample index. This helps in identifying time points in the data where bugs occur, and in tracking these times points through various nodes.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • enabled
    Whether this stage is enabled.

    • verbose name: Enabled
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

AssertIdentical

Ensure that the two input signals have identical data.

This node compares the packets of two data inlets, and ensures that their content (numeric data and optionally also meta-data) is identical to within a given tolerance.

Version 1.0.0

Ports/Properties

  • 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)
  • data1
    First data stream.

    • verbose name: Data1
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: IN
  • data2
    Second data stream.

    • verbose name: Data2
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: IN
  • check_metadata
    Also check meta-data. If false, only the numeric contents are checked.

    • verbose name: Check Metadata
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • tolerance
    Numerical tolerance. This is relative to the scale of the data values.

    • verbose name: Tolerance
    • default value: 0.001
    • port type: FloatPort
    • value type: float (can be None)
  • verbose
    Print verbose debug output.

    • verbose name: Verbose
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

AssertMonotonicTime

Assert that the time stamps in the given data are monotonically increasing.

This can be used to debug certain situations where this is not the case, e.g., jittery time stamps, repeated data packets, and the like. Some nodes require time stamps to be non-decreasing to function correctly, for instance the Segmentation node.

Version 1.0.0

Ports/Properties

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

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

AssertNoDropouts

Assert that the given data's time stamps contain no dropouts.

This node works with streaming and non-streaming data, and ensure that successive timestamps in the time axis are congruent with the advertised sampling rate (within a certain tolerance). It warns if this is not the case.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • tolerance
    Tolerated jitter. If the sampling interval differs by more than this jitter, you will see spurious dropout warnings.

    • verbose name: Tolerance
    • default value: 0.0001
    • port type: FloatPort
    • value type: float (can be None)

AssertNoDuplicateChunks

Check for (and optionally remove) successive duplicate chunks from the data.

This node checks if a chunk matches the previous chunk and if so, it can drop it from the data. Note that it would be advisable to fix the root cause instead, which is likely a buggy data acquisition or transmission process.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • show_warnings
    Show warnings when dropping chunks.

    • verbose name: Show Warnings
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • drop_duplicates
    Drop duplicate chunks.

    • verbose name: Drop Duplicates
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

ChannelDiagnostics

This node calls several other nodes, such as LineNoise, CorrelationMetric and HighFrequencyNoise, to compute and display a single weighted "Bad Channel" signal quality metric which is displayed as a topoplot.

The three individual metrics can also be displayed in their own topoplots by selecting those options. This is for streaming data only.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • line_noise
    Line Noise Topoplot.

    • verbose name: Show Line Noise Topoplot
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • initial_dims_ln
    Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, eight]. If x, y are set to 0 each, then the window will appear in the top left corner of the screen.

    • verbose name: Initial Window Position
    • default value: [0, 950, 500, 400]
    • port type: ListPort
    • value type: list (can be None)
  • correlation_metric
    Correlation Metric Topoplot.

    • verbose name: Show Correlation Metric Topoplot
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • initial_dims_cm
    Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, eight]. If x, y are set to 0 each, then the window will appear in the top left corner of the screen.

    • verbose name: Initial Window Position
    • default value: [0, 0, 500, 400]
    • port type: ListPort
    • value type: list (can be None)
  • hf_noise
    High Frequency Noise Topoplot.

    • verbose name: Show High Frequency Noise Topoplot
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • initial_dims_hf
    Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, eight]. If x, y are set to 0 each, then the window will appear in the top left corner of the screen.

    • verbose name: Initial Window Position
    • default value: [0, 500, 500, 400]
    • port type: ListPort
    • value type: list (can be None)
  • title_prefix
    Prefix to prepend to plot titles.

    • verbose name: Title Prefix
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • bad_channel
    Bad Channel Classification

    • verbose name: Show Bad Channel Classification Topoplot
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • initial_dims_bc
    Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, eight]. If x, y are set to 0 each, then the window will appear in the top left corner of the screen.

    • verbose name: Initial Window Position
    • default value: [600, 500, 500, 400]
    • port type: ListPort
    • value type: list (can be None)

ComputeImpedance

Compute channel impedance for Cognionics (CGX) EEG devices.

The impedance values are output in a separate packet called 'impedance' with a Space axis with the channels. If there are multiple incoming EEG streams with impedance the 'impedance' packet will contain one stream of values for each incoming EEG stream, and given the same name. This node is designed for realtime use, but the output values can then be average over time in an offline pipeline. This node also optionally removes the sine wave injected by the device and used to compute channel impedance, therefore modifying the packet passing through the Data port. It is assumed that AssignChannelLocations is placed before this node to remove any non-EEG channels from being computed. Once the buffer (equal to window_length) is full, impedance is recomputed (for window_length) with each incoming sample. Impedance values are expressed in kOhms. Impedance values of typically indicate that the reference channel is not connected, or an electrode is not in contact with the body at all.

Version 1.0.0

Ports/Properties

  • 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)
  • data
    Data from a CGX device that includes an impedance signal.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • impedance
    Output, a packet containing the impedance values.

    • verbose name: Impedance
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • window_length
    Window length, in samples, over which the impedance value is computed. Minimum should be 500 to ensure proper computation.

    • verbose name: Window Length
    • default value: 500
    • port type: IntPort
    • value type: int (can be None)
  • remove_carrier_wave
    Remove the impedance carrier wave inserted into the signal by the device and used to compute the channel impedance.

    • verbose name: Remove Carrier Wave
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • perform_offset_check
    When true, the offset of the signal power is computed for each channel, and channels with an abnormally high offset (indicating the electrode is not touching the head) will have their impedance value set to 0 (typically indicating no/invalid impedance data). This should usually be set to True, but you can set to False to see the actual impedance values for such channels (bearing in mind that such low values may not be a reliable indicator of channel signal quality.)

    • verbose name: Perform Offset Check
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • data_passthrough_threshold
    Number of channels that can have an impedance value of 0 (high offset), beyond which the data packet will be set to None (so the EEG data will not be passed through). Set to 0 or None to pass data through without this check.

    • verbose name: Data Passthrough Threshold
    • default value: 7
    • port type: IntPort
    • value type: int (can be None)
  • verbose
    Print impedance values to log stream.

    • verbose name: Verbose
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

CopyData

Copy the given data.

This node is for testing and debugging purposes. The node can skip None values, and optionally skip empty values, which means that these values will not be output, but rather the most recent value that was not skipped. The node can also optionally record a history of the (non-skipped) data values that it received.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • history
    List of collected data packets. Only if store_history was enabled.

    • verbose name: History
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • ignore_none
    Ignore None values. If a None value comes in, the previous data value will be retained.

    • verbose name: Ignore None
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_empty
    Ignore empty values. If an empty packet comes in, the previous data value will be retained.

    • verbose name: Ignore Empty
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • store_history
    Store history of incoming data.

    • verbose name: Store History
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

CorrelationMetric

A meta-node that repairs bad channels and evaluates the correlation of each channel to its neighbors.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • min_corr
    Correlation threshold. Higher values (above 0.7) are more aggressive and will cause channels to be repaired even when they have only moderate artifacts. Values below 0.5 would be considered rather lax (i.e., only the worst channel artifacts get repaired). This threshold is based on the correlation between a channel and what one would expect the channel to be based on the other channels.

    • verbose name: Correlation Threshold
    • default value: 0.8
    • port type: FloatPort
    • value type: float (can be None)
  • window_len
    Window length to compute correlations. The length of the time windows, in seconds, for which channel quality is computed, i.e. time granularity of the measure. Ideally this is short enough to reasonably capture periods where artifacts happen, but no shorter (otherwise the statistic becomes too noisy and thus unreliable).

    • verbose name: Sliding Window Length
    • default value: 5
    • port type: FloatPort
    • value type: float (can be None)
  • subset_size
    Size of random channel subsets to use. This is for use in a RANSAC estimator, and can be given as number of channels or, if below 1.0, as a fraction of the total number of channels. Smaller subsets (e.g., 0.1-0.15) together with higher number of Ransac samples (e.g., 50-100) gives a more robust estimate, at increased computational cost, which can be quite substantial.

    • verbose name: Ransac Subset Size
    • default value: 0.15
    • port type: FloatPort
    • value type: float (can be None)
  • num_samples
    Number of random channel subsets to use. This for use in a RANSAC estimator. Higher numbers (e.g., 50-100) together with smaller subset sizes (e.g., 0.1-0.15) give a more robust estimate, at higher computational cost.

    • verbose name: Ransac Subset Count
    • default value: 200
    • port type: IntPort
    • value type: int (can be None)
  • location_wise_corr
    Calculate correlation based on channel locations, instead of calibration statistics (experimental). If the amount of collected calibration data was very small, then using channel locations, if known a priori, can result in better correlation statisics, and thus better identification of artifacts. This is primarily for the case where this method is used without a preceding removal of bad channels, and with little initial calibration data.

    • verbose name: Prefer Location-Based Statistics
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • linenoise_aware
    Use line-noise aware processing. Whether the operation should be performed in a line-noise aware manner. If enabled, the correlation measure will not be affected by the presence or absence of line noise. May be turned off if line noise has already been removed.

    • verbose name: Line Noise Aware Processing
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

EstimateLag

Estimate the lag (delay) of the data in seconds

Version 0.7.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • timebase
    Time base to use. The neuropype/lsl setting uses the standard NP/LSL clock. If you have a data source that uses the wall clock as time stamps, then use wallclock.

    • verbose name: Time Base
    • default value: neuropype/lsl
    • port type: EnumPort
    • value type: object (can be None)
  • display
    Display result in console.

    • verbose name: Display
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • print_label
    Optional label. This allows you to place the node at multiple points in the pipeline while being able to tell the result apart in the console printout.

    • verbose name: Print Label
    • default value: default
    • port type: StringPort
    • value type: str (can be None)

EstimateUpdateRate

Estimate the update rate of NeuroPype.

Technically, the node simply estimates how many times per second NeuroPype updates this node. Typically this is the rate at which the entire pipeline updates, unless some special nodes were added to skip updating this node.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • time_window
    Estimation time window. In seconds.

    • verbose name: Time Window
    • default value: 5
    • port type: IntPort
    • value type: int (can be None)
  • ignore_empty_packets
    Do not count empty packets. If this is enabled, the node essentially tracks the rate at which new non-empty data chunks are being received.

    • verbose name: Ignore Empty Packets
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • measure_type
    Whether to estimate the tick rate (in Hz) or the tick interval (in ms).

    • verbose name: Measure Type
    • default value: rate
    • port type: EnumPort
    • value type: object (can be None)
  • estimator
    Estimator to use for the measure.

    • verbose name: Estimator
    • default value: mean
    • port type: EnumPort
    • value type: object (can be None)
  • display
    Display result in console.

    • verbose name: Display
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

HighFrequencyNoise

A meta-node that obtains a ratio of high frequencies (e.g

. >50 Hz) to all frequencies in order to diagnose potentially bad channels.

Version 1.0.0

Ports/Properties

  • 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)
  • 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: 10
    • 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: object (can be None)
  • frequencies
    Transition frequencies for the highpass filter. Provide two freqencies to determine the rolloff curve. .

    • verbose name: Frequencies
    • default value: [45, 50]
    • port type: ListPort
    • value type: list (can be None)

LineNoise

A meta-node that performs a standard line noise chain to determine ratio of potential line noise contamination for diagnostics.

Version 1.0.0

Ports/Properties

  • 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)
  • 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: object (can be None)

NoDataAlert

Checks that data is coming through the pipeline, and gives a user alert in cases where no data has come through for a configurable amount of time.

Version 0.0.1

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • allowed_gap
    Amount of time, in seconds, for which there can be no data before an alert is sounded (at any time when the pipeline is running). Set both this param and markers_allowed_gap to 0 to skip checking for data.

    • verbose name: Allowed Gap
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • allowed_startup_delay
    Time, in seconds, by which to delay starting to check for no data when the pipeline is first launched (ie., to give the device time to connect, or start an LSL stream, etc.)

    • verbose name: Allowed Startup Delay
    • default value: 15
    • port type: IntPort
    • value type: int (can be None)
  • markers_allowed_gap
    Specify a separate allowed interval for any marker streams (since they may emit data at greater intervals). Setting this to None (empty) or 0 will not check any marker streams for data.

    • verbose name: Markers Allowed Gap
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • exclude_streams
    A list of streams to exclude from the data check. Leaving this empty (None) will sound the alert if any stream in the data packet does not have data for the specified period of time.

    • verbose name: Exclude Streams
    • default value: []
    • port type: ListPort
    • value type: list (can be None)

PrintToConsole

Print the given data to the console.

This is mainly useful for debugging. Note that the data can be quite large and therefore create a lot of logspam -- make use of the options to print only those aspects of the data that you are interested in.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • only_nonempty
    Only print non-empty packets.

    • verbose name: Only Nonempty
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • print_compact
    Print packets in a compact format. If enabled, this overrides the other options for selective printing.

    • verbose name: Print Compact
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • print_data
    Print the data ccontents and the shape.

    • verbose name: Print Data
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_markers
    Print list of markers contained in the packet, if any.

    • verbose name: Print Markers
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_channel
    Print channel names, if any.

    • verbose name: Print Channel
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_time
    Print time range covered by the data, if any.

    • verbose name: Print Time
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_trial
    Print trial/instance information in the data, if any.

    • verbose name: Print Trial
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • print_streams
    List of stream names for which to generate output.

    • verbose name: Streams To Print
    • default value: []
    • port type: ListPort
    • value type: list (can be None)

QualityMetricsCompute

A meta-node (a node that calls other nodes), which generates a set of quality metrics for each signal file.

If several files are passed in succession, average metrics for all the files will be generated for a report, though the details for each individual file will be exported to CSV if that option is selected. Computed metrics are the average for the entire file.

Version 1.1.2

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • diag_bad_out
    Bad Channel metric (session average)

    • verbose name: Diag Bad Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diag_drop_out
    Channel Dropout metric (session average)

    • verbose name: Diag Drop Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diag_cor_out
    Channel Correlation metric (session average)

    • verbose name: Diag Cor Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diag_noise_out
    Noise Level metric (session average)

    • verbose name: Diag Noise Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • art_rem_out
    Artifact Ratio metric (session average)

    • verbose name: Art Rem Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • ln_data_out
    Line Noise metric (session average)

    • verbose name: Ln Data Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diag_drop_time_out
    Channel Dropout metric (by time)

    • verbose name: Diag Drop Time Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • ln_data_time_out
    Line Noise metric (by time)

    • verbose name: Ln Data Time Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • data_badtime_out
    Data after bad time windows removed (by time)

    • verbose name: Data Badtime Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • channel_range
    List of channels to retain. Can be a list of channel names or indices, or a string. If the latter, regular Python list and range syntax is supported, as well as comma-separated or space-separated lists of channel names or indices lists. The special keyword "all" stands for all channels.

    • verbose name: Channel Range
    • default value: :
    • port type: Port
    • value type: object (can be None)
  • highpass_frequencies
    Low noise frequencies to be filtered out with a highpass filter. You can either give the cutoff frequency as a single value, or two frequencies (separated by a comma), to specify the rolloff curve.

    • verbose name: Highpass Frequencies
    • default value: [0.5, 1.0]
    • port type: ListPort
    • value type: list (can be None)
  • highpass_stop_atten
    Minimum attenuation in stopband for the highpass filter. 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: Highpass Min Stopband Attenuation
    • default value: 50.0
    • port type: FloatPort
    • value type: float (can be None)
  • bad_channel_corr_threshold
    Correlation threshold. Higher values (above 0.7) are more stringent and will remove more channels (i.e., moderately bad channels get removed). Values below 0.6 would be considered very lax (i.e., only the worst channels get removed). This threshold is based on the correlation between a channel and what one would expect the channel to be given the other channels. Note that this parameter is only used when channel locations are available.

    • verbose name: Correlation Threshold
    • default value: 0.8
    • port type: FloatPort
    • value type: float (can be None)
  • bad_channel_noise_threshold
    High-frequency noise threshold. Lower values (below 3.5) are more stringent and will remove more channels (i.e., moderately bad channels will get removed). Values above 5 would be considered very lax (i.e., only the worst channels get removed). This threshold is based on the amount of high frequency noise compared to other channels, and is measured in standard deviations.

    • verbose name: Bad Channel Noise Threshold
    • default value: 4
    • port type: FloatPort
    • value type: float (can be None)
  • burst_removal_cutoff
    Threshold for burst-type artifact removal, in standard deviations. Data portions whose amplitude is larger than this threshold (relative to the calibration data) are considered bad data and will be removed. The most aggressive value that can be used without losing too much EEG is 3. A quite conservative value would be 10.0.

    • verbose name: Burst Removal Cutoff
    • default value: 10.0
    • port type: FloatPort
    • value type: float (can be None)
  • use_clean_window
    Use clean time windows to calibrate artifact removal thresholds. This applies to all artifact removal steps that involve such a calibration, including bad-channel removal and burst-artifact removal.

    • verbose name: Use Clean Window
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calib_seconds
    Minimum amount of data 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 measures before any output is produced. (This is used both for bad channel removal and artifact removal.)

    • verbose name: Calib Seconds
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • init_on
    Time range to initialize on. If two numbers are given, either in seconds, or as fractions of the calibration data (if both below 1), then the filter will be initialized only on that subset of the calibration data. Another use case is to select an initial baseline period in a longer recording, in order to avoid having to re-run the (fairly expensive) filter in each fold of a cross-validation.

    • verbose name: Initialize On This Time Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • clean_signal_range
    Minimum and maximum of clean signal range, in multiples of standard deviation. The minimum and maximum standard deviations within which the power of a channel must lie (relative to a robust estimate of the clean EEG power distribution in the channel) for it to be considered not bad. Use values between [-10 15].

    • verbose name: Clean Signal Range
    • default value: [-4, 6]
    • port type: ListPort
    • value type: list (can be None)
  • max_bad_channels
    Maximum fraction of bad channels allowed . The maximum fraction of bad channels that a retained window may still contain (more than this and it is removed). Reasonable range is 0.05 (very clean output) to 0.3 (very lax cleaning of only coarse artifacts).

    • verbose name: Max Bad Channels
    • default value: 0.2
    • port type: FloatPort
    • value type: float (can be None)
  • concatenate_files
    Concatenates the result of each incoming file, to generate multi-file averages. Uncheck if generating a single report for each file.

    • verbose name: Concatenate Files
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • use_caching
    Enable caching. This will significantly speed up re-use of the same data.

    • verbose name: Use Caching
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • compute_time
    Compute metrics over time. Set to false if concatenating multiple files.

    • verbose name: Compute Time
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

RandomMatrix

Generate an artificial packet with a random matrix.

This node works offline or online. The node outputs a Packet whose properties are virtually all fully customizable in the parameters of the node. Among others, it is possible to set the name of the chunk, its dictionary of meta-data properties, as well as the axis types and labels used for the data bblock, and the range and distribution of the numeric content. The behavior when the node is successively updated (e.g., in online mode) is configurable. This node can be used to generate debug or test data.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • chunk_name
    "Name of generated chunk.

    • verbose name: Chunk Name
    • default value: random_matrix
    • port type: StringPort
    • value type: str (can be None)
  • dims
    Dimensions of matrix.

    • verbose name: Dims
    • default value: [5, 5]
    • port type: ListPort
    • value type: list (can be None)
  • axis_types
    Axis types.

    • verbose name: Axis Types
    • default value: ['space', 'space']
    • port type: ListPort
    • value type: list (can be None)
  • axis_labels
    Axis labels.

    • verbose name: Axis Labels
    • default value: {0: ['A', 'B', 'C', 'D', 'E'], 1: ['U', 'V', 'W', 'X', 'Y']}
    • port type: DictPort
    • value type: dict (can be None)
  • value_range
    Value range. Low/high for uniform, mean/std for normal distribution.

    • verbose name: Value Range
    • default value: [0, 1]
    • port type: ListPort
    • value type: list (can be None)
  • distribution
    Distribution that the values should follow.

    • verbose name: Distribution
    • default value: uniform
    • port type: EnumPort
    • value type: object (can be None)
  • flavor
    Flavor of the node's output. In offline-once mode, the node outputs a single packet, and after that outputs no more data. In that sense, it acts like one of the import nodes, which also output only once (unless they are asked to import a new filename). In offline-same mode, the node will repeatedly emit the exact same packet (with the same values). In online-same it behaves the same as offline-same. In online-rerandomized mode, the node outputs a fresh packet with new numbers on every update.

    • verbose name: Flavor
    • default value: offline-once
    • port type: EnumPort
    • value type: object (can be None)
  • chunk_properties
    Additional chunk properties.

    • verbose name: Chunk Properties
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)

SanityCheck

Check data coming from a file for certain criteria.

Passes the data through if all criteria pass, and passes None otherwise. Designed for offline data, such as to terminate a pipeline if data would cause an error. Outputs the failed checks to a text file with the same path as the original file, with .errors.txt suffix added.

Version 1.0.0

Ports/Properties

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

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • required_streams
    List of stream names which must be present in the data packet.

    • verbose name: Required Streams
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • eeg_stream
    Name of EEG stream to check. Leave empty to check the first signal stream found.

    • verbose name: Eeg Stream
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • has_data
    The packet must contain data (data tensor not empty).

    • verbose name: Has Data
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • min_length
    Minimum data length, in seconds, based on the difference between the first and last time stamps.

    • verbose name: Min Length
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • max_length
    Maximum data length, in seconds, based on the difference between the first and last time stamps. (Catch very large files that would cause a memory error.)

    • verbose name: Max Length
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • required_axes
    List of axes which must be present in the data, at minimum.

    • verbose name: Required Axes
    • default value: ['time', 'space']
    • port type: ListPort
    • value type: list (can be None)
  • excluded_axes
    List of axes which must NOT be present in the data.

    • verbose name: Excluded Axes
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • marker_stream
    Packet must contain a marker stream.

    • verbose name: Marker Stream
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • required_markers
    List of markers which must appear at least once in a marker stream.

    • verbose name: Required Markers
    • default value: []
    • port type: ListPort
    • value type: list (can be None)