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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • enabled
    Whether this stage is enabled.

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

AppendAxis

Append a new one-element axis to the data.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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_axis
    New axis type to use. This is the type of axis that should replace the previous one.

    • verbose name: New Axis To Insert
    • default value: space
    • port type: EnumPort
    • value type: object (can be None)
  • label
    Axis label. Optionally the label of the axis to be added.

    • verbose name: Axis Label
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • init_data
    Optional index value for the new axis. For instance, when you create a frequency axis, you can give the frequency value to use here. Likewise, for the space axis, you can give the channel name, for a feature axis the feature name, for a time axis the time stamp, for a lag axis the lag offset value (in samples), and for an instance axis the payload value per instance (as instance time stamps some dummy values are generally used).

    • verbose name: Value For New Axis
    • default value: None
    • port type: StringPort
    • value type: str (can be None)

ArtifactRemoval

Remove various kinds of high-amplitude artifacts from the signal.

Artifacts are identified based on a threshold, given in standard deviations relative to (fairly) clean calibration data. This filter will work best on signals with multiple correlated channels, such as EEG or MEG. Important: This filter assumes the the input signal has already been highpass filtered to remove drifts (e.g., using an IIR filter). It makes no assumption on stationarity of the artifact sources, or repeating artifact patterns, and can handle anything from blinks to muscle and movement artifacts, to high-amplitude sensor glitches or EM interference. 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. This filter operates on a sliding window, and by default outputs processed data only after a certain amount of future data has been seen, in order to make a good decision on what is an artifact and what isn't, and this timing behavior is tunable through two parameters. One can also tune how robust the method is to artifacts in the calibration data (the default is quite robust). If you are running this filter on data where you stimulate with high-amplitude signals, and want to retain the EEG response, such as in SSVEP, you need to make the filter completely 'blind' to the stimulation frequencies, by overriding the IIR filter coefficients A and B, for instance with a hard Elliptic filter with high stopband suppression. The implementation is partially based on the paper by S. Blum et. al [1]., although it has been modified to improve the performance. [1] S. Blum, N. S. J. Jacobsen, M. G. Bleichner and S. Debener, "A Riemannian Modification of Artifact Subspace Reconstruction for EEG Artifact Handling," Front. Hum. Neurosci., 26 April 2019 | https://doi.org/10.3389/fnhum.2019.00141

Version 2.4.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 indicating the ratio of artifact to the clean eeg.

    • verbose name: Diagnostic
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • cutoff
    Threshold for 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 2.5. A quite conservative value would be 5.0.

    • verbose name: Removal Threshold
    • default value: 7.5
    • port type: FloatPort
    • value type: float (can be None)
  • window_length
    Window length used to check the data for artifact content. This is ideally as long as the expected time scale over which artifact components persist and their locations remain reasonably stationary, but short enough that there are several 100s of windows extracted for the calibration data.

    • verbose name: Sliding Window Length
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • lookahead
    Amount of look-ahead that the algorithm should use. Since the processing is causal, the output signal will be delayed by this amount. This value is in seconds and should be between 0 (no lookahead) and half the window length (optimal lookahead). The recommended value and default is window length/2.

    • verbose name: Override Lookahead
    • default value: None
    • port type: Port
    • value type: object (can be None)
  • window_overlap
    Window overlap fraction. The fraction of two successive windows that overlaps. Higher overlap ensures that fewer artifact portions are going to be missed (but is slower).

    • verbose name: Window Overlap Fraction
    • default value: 0.66
    • port type: FloatPort
    • value type: float (can be None)
  • max_dims
    Maximum fraction or number of simultaneous artifact components to remove. Up to this many components can be removed for a given data segment (can also be given as a fraction of the number of channels, if below 1.0). In low-channel settings, one might limit this to between 0.25 and 0.5. One can also use a higher value if it needs to be guaranteed that no artifacts make it through, even in extremely noisy situations. If this is set to 0, a heuristic will be used where for 4 or less channels, this value resolves to 1, and for 16 or more channels, it is 66%, with linear interpolation in between.

    • verbose name: Max Simultaneous Artifacts Fraction
    • default value: 0
    • port type: FloatPort
    • value type: float (can be None)
  • max_dropout_fraction
    Max fraction of calibration data where channels may be unplugged. This is used for estimating the threshold accurately. Also refers to any other condition where a channel may have lower amplitude than regular EEG.

    • verbose name: Max Fraction Of Unplugged Calib Data
    • default value: 0.1
    • port type: FloatPort
    • value type: float (can be None)
  • min_clean_fraction
    Min fraction of calibration data that is assumed to be clean. This is used for estimating the threshold accurately. This actually refers to the percentage of time windows which are clean, and since time windows have a certain length, a single brief spike can pollute an entire time window worth of data. If you know that your calibration data is clean, you could increase this number to get somewhat higher-quality threshold estimates.

    • verbose name: Min Fraction Of Clean Calibration Data
    • default value: 0.25
    • port type: FloatPort
    • value type: float (can be None)
  • step_size
    Update statistics at least every this many seconds. The larger this is, the faster the algorithm will be, at least on large (offline) chunks, but as a downside it may occasionally miss brief or small artifacts. This value must not be larger than the window length. Using a too-short value is also not ideal since it may give you sharp discontinuities in the data. The minimum value is 1/sampling rate ( update for every sample) while a good value is 1/3 of a second. Note that generally an update is performed on the last sample of each data chunk, so during real-time processing of short chunks this value rarely plays a role. Values larger than one are interpreted to be in samples (for backwards compatibility).

    • verbose name: Internal Step Size In Seconds
    • default value: 0.2
    • port type: FloatPort
    • value type: float (can be None)
  • max_mem
    The maximum amount of memory used by the algorithm, in MB. The recommended value is at least 256. Using smaller amounts of memory is less CPU-efficient, but does not affect the cleaning result.

    • verbose name: Max Memory Gb
    • default value: 256
    • port type: Port
    • value type: object (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.

    • verbose name: Gather This Much Calibration Data
    • default value: 45
    • 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)
  • emit_calib_data
    Emit calibration-data chunk. If disabled, this filter will 'eat' the calibration data. Since this chunk is quite long, it can be good 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)
  • block_size
    Block size for robust estimator. Data statistics will be estimated in blocks of this many samples and then robustly averaged. If this is too small, especially for a large number of channels, you may get a convergence warning.

    • verbose name: Estimator Block Size
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • b
    Override spectrum shaping IIR filter coefficient b. This is the numerator coefficient vector of an IIR filter that is used to shape the spectrum of the signal when calculating artifact statistics. The output signal does not go through this filter. This is an optional way to tune the sensitivity of the algorithm to each frequency component of the signal. The default filter is less sensitive at alpha and beta frequencies and more sensitive at delta (blinks) and gamma (muscle) frequencies.

    • verbose name: Override Iir Coeff Vector B
    • default value: None
    • port type: Port
    • value type: object (can be None)
  • a
    Override spectrum shaping IIR filter coefficient a. This is the denominator coefficient vector of an IIR filter that is used to shape the spectrum of the signal when calculating artifact statistics. The output signal does not go through this filter. This is an optional way to tune the sensitivity of the algorithm to each frequency component of the signal. The default filter is less sensitive at alpha and beta frequencies and more sensitive at delta (blinks) and gamma (muscle) frequencies.

    • verbose name: Override Iir Coeff Vector A
    • default value: None
    • port type: Port
    • value type: object (can be None)
  • use_clean_window
    Use clean time windows for calibration. This is available only during offline processing.

    • verbose name: Use Clean Time Windows For Calibration
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • use_legacy
    Use legacy option (DEPRECATED)

    • verbose name: Use Legacy
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • zscore_thresholds
    Minimum and maximum of clean signal range (for use clean window option). 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, usually [-10 15].

    • verbose name: Clean Signal Range
    • default value: [-5, 7]
    • port type: ListPort
    • value type: list (can be None)
  • max_bad_channels
    Maximum fraction of bad channels allowed (for use clean window option). 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 Fraction Of Bad Channels
    • default value: 0.2
    • port type: FloatPort
    • value type: float (can be None)
  • window_len_cleanwindow
    Length of sliding window (for use clean window option). This is the window length used to check the data for artifact content, in seconds. This is ideally as long as the expected time scale of the artifacts but short enough to allow for several 1000 windows to compute statistics over.

    • verbose name: Window Length
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • window_overlap_cleanwindow
    Window overlap fraction (for use clean window option). The fraction of two successive windows that overlaps. Higher overlap ensures that fewer artifact portions are going to be missed, in expense of being slower.

    • verbose name: Window Overlap Fraction
    • default value: 0.66
    • port type: FloatPort
    • value type: float (can be None)
  • stddev_cutoff
    The number of standard devations between clean data and data with artifacts, at which the artifactual data is clamped when computing the artifact ratio that is output through the diagnostics port. (In other words, all values above this std.dev will have the same artifact ratio in order to provide a more robust measure that is not impacted by abnormally high artifacts.) This is only used for diagnostics and does not impact the cleaning of the data itself.

    • verbose name: Stddev Cutoff
    • default value: 20
    • port type: IntPort
    • value type: int (can be None)
  • min_required_channels
    Minimum number of channels required to preform artifact removal. Setting this to a value below 2 will likely cause this node to fail and is not recommended. Setting this param to 0 disables this check.

    • verbose name: Min Required Channels
    • default value: 2
    • port type: IntPort
    • value type: int (can be None)
  • riemannian
    Use Riemannian methods if applicable.

    • verbose name: Riemannian
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • preserve_band
    Optionally a dictionary to define the frequency band to preserve. This is given via fields 'freqs', which has the frequency points of interest, and a field 'gains' which has for each frequency point the desired relevance (gain), typically between 0 and 1. An example is {'freqs': [7,8,12,13], 'gains': [0,1,1,0]} to preserve the alpha band. Additionally the 'order' parameter can be given to choose the FIR filter order (e.g., 50 for an alpha bandpass at 200-250 Hz).

    • verbose name: Preserve Band
    • default value: None
    • port type: DictPort
    • value type: dict (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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (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)
  • metadata
    User-definable meta-data associated with the node.

    • 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

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • 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)
  • metadata
    User-definable meta-data associated with the node.

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

BadChannelRemoval

Remove channels with abnormal data from a continuous EEG signal.

Ensures that the data contains no channels that record only noise for extended periods of time. If channels with control signals are contained in the data (e.g., trigger channels), these are usually also removed. Important: This filter assumes the the input signal has already been highpass filtered to remove drifts (e.g., using an IIR filter). There are two threshold criteria: one is a minimum correlation that a channel needs to exceed to be considered good, and the other is a maximum tolerated high-frequency noise level that a channels must not exceed to be considered good. There is also a fallback mode for the case where no channel/sensor locations are available, and some additional tunable parameters related to it. Note that the fallback does not give as good results as the default mode that uses channel locations (there is a utility node named Assign Channel Locations, which can be used to guess locations based on the channel labels). 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 what channels to keep, before any output is produced. The set of retained channels is considered "trainable state", and can be saved in model files for later reuse. The algorithm can be somewhat slow to calibrate on long data, especially if a high value for the RANSAC subset count parameter is used; the default is tuned for robustness and quality, but it's possible to change these values for faster calibration time.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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_badchannels
    Diagnostic information indicating the bad channels.

    • verbose name: Diagnostic Badchannels
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_noiselevel
    Diagnostic information indicating the noise zscore for different channels.

    • verbose name: Diagnostic Noiselevel
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_corr_flagged
    Diagnostic information holding a channels x time point binary mask of which channes are flagged, and at what time points, as less correlated to their neighbors than the given threshold. This is an internal measure that is used by the node to decide what channels to mark bad (based on the max_broken_time parameter).

    • verbose name: Diagnostic Corr Flagged
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_avg_corr
    Diagnostic information indicating the average correlation across channels over time.

    • verbose name: Diagnostic Avg Corr
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • bad_channels
    A list of the channels removed.

    • verbose name: Bad Channels
    • default value: None
    • port type: DataPort
    • value type: list (can be None)
    • data direction: OUT
  • 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)
  • 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: Noise Threshold
    • default value: 4
    • port type: FloatPort
    • value type: float (can be None)
  • window_len
    Window length to compute correlations. Length of the windows, in seconds, over which correlation is computed. Ideally this is short enough to isolate periods with temporary multi-channel artifacts, like movements (which do not count towards bad channels), but not shorter (otherwise the statistic becomes too noisy and thus unreliable).

    • verbose name: Correlation Window Length
    • default value: 5
    • port type: FloatPort
    • value type: float (can be None)
  • max_broken_time
    Maximum duration or fraction of broken data to tolerate. Maximum time, either in seconds or as fraction of the calibration data, if below 1.0, during which a channel may be broken while still considered good (i.e., usable). This value should not be larger than half the duration of the calibration data.

    • verbose name: Max Allowed Broken Fraction
    • default value: 0.4
    • 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 is given as a fraction of the total number of channels. Smaller subsets together with higher number of Ransac samples gives a more robust estimate, at increased computational cost during calibration.

    • 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 together with smaller subset sizes give a more robust estimate, at higher computational cost during calibration.

    • verbose name: Ransac Subset Count
    • default value: 200
    • port type: IntPort
    • value type: int (can be None)
  • protect_channels
    Channels to protect from removal. This protects the channels with the given names from being removed. The syntax is as in ['Fp1','Fp2','C3','Cz'].

    • verbose name: Protect Channels From Removal
    • default value: []
    • port type: ListPort
    • value type: list (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)
  • keep_unlocalized_channels
    Keep unlocalized channels. Whether to keep channels which have no location information and can therefore not be assessed using location-aware measures. Otherwise these would generally be removed unless the fallback mode is used.

    • verbose name: Keep Unlocalized Channels
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_chanlocs
    Fallback that ignores channel locations. If enabled, a fallback method will be used that relies on the fallback correlation treshold and fallback quantile parameters. This method is also used if no channel locations are present.

    • verbose name: Force Fallback For No Locations
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • min_corr
    Minimum correlation threshold for fallback case. This threshold is only used if the fallback for no locations is enabled. If a channel is less correlated to any of the other channels (except for the most correlated k percent of channels, as set by the fallback ignore quantile parameter), then the channel will be marked as potentially bad in that time window.

    • verbose name: Fallback Correlation Threshold
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • ignored_quantile
    Max fraction of synchronous channels for fallback case. This parameter is only used if the fallback for no locations is enabled. When a channel is checked for its correlation to other channels, this is the fraction of other channels that may be synchronous with it (i.e., highly correlated) because they might be short-circuited with the channel being checked, or which may measure the same noise process (e.g., line noise) for some other reason. Increasing this value within reason can make the criterion more robust.

    • verbose name: Fallback Max Synchronous Channels
    • default value: 0.1
    • port type: FloatPort
    • value type: float (can be None)
  • rereferenced
    Run calculations on re-referenced data. This can improve performance in environments with extreme all-channel EM noise, but will decrease robustness against single channels with extreme excursions (e.g., huge spikes).

    • verbose name: Compute On Re-Referenced Data
    • default value: False
    • 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)
  • 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.

    • verbose name: Gather This Much Calibration Data
    • default value: 20
    • port type: IntPort
    • value type: int (can be None)
  • coords_override
    Override sensor coordinates. Allows overriding the coordinates of the channels.

    • verbose name: Override Sensor Coordinates
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • use_clean_window
    Use clean time windows for calibration. Setting this to False will flag channels as bad if they are across the entire file including time windows when the data is considered bad. Set to True (default) is a more stringent test that only flags channels as bad if they are deemed so during time windows when the data is considered "good" overall (other channels are ok). Note that this is available only for offline processing (ignored on streaming data).

    • verbose name: Use Clean Time Windows For Calibration
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • zscore_thresholds
    Minimum and maximum of clean signal range (for use clean window option). 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, usually [-10 15].

    • verbose name: Clean Signal Range
    • default value: [-3.5, 5]
    • port type: ListPort
    • value type: list (can be None)
  • max_bad_channels
    Maximum fraction of bad channels allowed (for use clean window option). 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 Fraction Of Bad Channels
    • default value: 0.15
    • port type: FloatPort
    • value type: float (can be None)
  • window_len_cleanwindow
    Length of sliding window (for use clean window option). This is the window length used to check the data for artifact content, in seconds. This is ideally as long as the expected time scale of the artifacts but short enough to allow for several 1000 windows to compute statistics over.

    • verbose name: Window Length
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • window_overlap
    Window overlap fraction (for use clean window option). The fraction of two successive windows that overlaps. Higher overlap ensures that fewer artifact portions are going to be missed, in expense of being slower.

    • verbose name: Window Overlap Fraction
    • default value: 0.66
    • port type: FloatPort
    • value type: float (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.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • line_noise
    Line Noise Topoplot.

    • verbose name: Show Line Noise Topoplot
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • line_noise_frequency
    Frequency in Hz that line noise is expected due to AC power (e.g . USA is 60 Hz, Europe is 50 Hz)

    • verbose name: Line Noise Frequency (Hz)
    • default value: 60Hz
    • port type: EnumPort
    • value type: object (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)
  • min_corr
    Correlation threshold for determining bad channels. Higher values (above 0.7) are more aggressive and mark more channels as being bad (red) or only acceptable (yellow). Values below 0.5 would be considered rather lax. 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)
  • 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)
  • always_on_top
    Plot windows should be always appear on top of other windows.

    • verbose name: Always On Top
    • default value: True
    • port type: BoolPort
    • value type: bool (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.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (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. (Not yet implemented.)

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

ConcatInputs

Concatenate the given input packets along a new or existing axis.

It is assumed that all data ports are either None or carry packets with the same number and type of chunks, and the chunks to be concatenated have the same number of elements along all axes except for the one along which they are concatenated. The meta-data is copied from the packet on the first input data port (in sequential order) that is non empty. If properties are specified, they will be applied to the axis of concatenated chunks whether or not a new axis is appended. If a new axis is created and the properties parameter is empty, sequential integers will be used as values. If append new axis is selected, the output will have two axes of the same type, one containing the concatenated values, and the other having the values of the first non-empty data port. This node can take up to 30 inputs simultaneously.

Version 1.3.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)
  • metadata
    User-definable meta-data associated with the node.

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

    • verbose name: Outdata
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • axis
    Axis along which to concatenate data.

    • verbose name: Concatenate Along Axis
    • default value: time
    • port type: EnumPort
    • value type: object (can be None)
  • create_new
    Whether to create a new axis. If enabled, a new axis of the desired type will be inserted and data will be concatenated along that axis.

    • verbose name: Append New Axis
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • new_axis_custom_label
    You can optionally specify a custom_label for the newly created axis, to distinguish it from the original axis.

    • verbose name: New Axis Custom Label
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • properties
    Values for the primary property of the new axis, if any. For instance, this would be a list of channel names if the axis is 'space'. If not given and a new axis is inserted, successive integers starting from 0 will be used as the values (so if this is e.g., a frequency axis, then the frequencies will be 0, 1, 2, and so on up to the number of packets that are concatenated.

    • verbose name: Values For New Axis
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • correct_order
    Correct axis order. If this is enabled, then axes will be re-ordered to match the axis order in the first data port. This only works if axes do not occur more than once in each block.

    • verbose name: Correct Order
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • allow_markers
    Enable to allow concatenation of streams with markers.

    • verbose name: Allow Markers
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • required_inputs
    Required number of inputs. If data is not received in at least this many inputs, None will be output for this tick.

    • verbose name: Required Inputs
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)

ConcatSuccessivePackets

Concatenate successive packets along some axis.

This node will buffer and concatenate any successive packets, until a None packet arrives. At that point, the concatenated data will be released into the output.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 concatenate data.

    • verbose name: Concatenate Along Axis
    • default value: time
    • port type: EnumPort
    • value type: object (can be None)
  • create_new
    Whether to create a new axis. If enabled, a new axis of the desired type will be inserted and data will be concatenated along that axis.

    • verbose name: Append New Axis
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • new_axis_label
    Label for the new axis along which to concatenate. Only applies if append new axis is set.

    • verbose name: New Axis Label
    • default value: concatenated
    • port type: StringPort
    • value type: str (can be None)
  • properties
    Values for the primary property of the new axis, if any. For instance, this would be a list of channel names if the axis is 'space'. If not given and a new axis is inserted, successive integers starting from 0 will be used as the values (so if this is e.g., a frequency axis, then the frequencies will be 0, 1, 2, and so on up to the number of packets that are concatenated.

    • verbose name: Values For New Axis
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • padding_value
    Value to use for padding, optional. If tensors are concatenated that differ in shape, then the concatation may not be applicable, unless each tensor is padded as necessary for to make the dimensions compatible. If this is set to 'raise', then incompatibly-sized tensors will raise an error in this node. If set to 'invalid', the data will be filled with invalid data (not a number). If set to 'zero', the fill value will be zeroes.

    • verbose name: Padding Value
    • default value: raise
    • port type: EnumPort
    • value type: object (can be None)
  • nominal_gap
    If axis is 'time', number of seconds to use as a gap between concatenated packets. This allows for algorithms such as filtering to be aware of a discontinuity in the time series.

    • verbose name: Nominal Gap
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • handle_markers
    If axis is 'time' and markers chunks are found with no 'time' axis but with 'instance' axis, then concatenate along the markers' chunks 'instance' axis.

    • verbose name: Handle Markers
    • default value: True
    • 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. (This node will copy whatever data type that is wired into from the preceeding node.)

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: object (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)
  • metadata
    User-definable meta-data associated with the node.

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

DataCounter

Counts data passing through the node in a given stream, and prints a log message every n seconds (configurable) with the number of samples received (along the time axis), since last check as well as total so far.

This information is also output in a separate port in the form of a dictionary. Counts signal streams with time axes only. Optionally updates a popup window with this information.

Version 0.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • stream_names
    The stream(s) for which to count the data packets passing through. If empty, counts data for all signal streams. (Event streams are ignored.)

    • verbose name: Stream Names
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • notification_interval
    Interval, in seconds, at which a log message is printed and the counter window updated (if popup_window is True).

    • verbose name: Notification Interval
    • default value: 5
    • port type: IntPort
    • value type: int (can be None)
  • popup_window
    Pop up and update a counter in a window. If false, only log messages will be printed.

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

DetectLineNoise

Detects the line noise (mains) frequency of raw signal data.

Sets a chunk property, 'mains_frequency', to a float of this value, as well as outputs it 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, for example, be wired into to a bandpass filter node, to remove line noise with a notch filter. Important: if using this node with streaming data, use an AccumulateCalibrationData node before this node to create a buffer of several seconds of data from which to detect the line noise.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to prrocess.

    • 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: object (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: object (can be None)
  • segment_samples
    Length of the sub-windows for spectral estimation. 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
    • 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)
  • onesided
    Return one-sided spectrum. If disabled, a two-sided (meaning: symmetric about the middle) spectrum will be computed, which is redundant for real-valued data, but required for complex-valued data (for complex data, the spectrum is always two-sided.

    • verbose name: Onesided Spectrum For Real-Valued Data
    • default value: True
    • port type: BoolPort
    • value type: bool (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: object (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)
  • 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)
  • 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)

Discretize

Discretize the input data (continuous) through a multi-level threshold function.

Input values that are below a threshold are mapped to a constant value (usually 0.0), and values that are above the threshold are mapped to another constant value (usually 1.0). This can be extended to an unlimited number of threshold levels. The new mapped values just need to contain 1 more value than the given number of threshold levels.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • threshold_cutoffs
    List of threshold values in sequential order. Can be any length.

    • verbose name: Threshold Cutoff Values
    • default value: [0.5]
    • port type: ListPort
    • value type: list (can be None)
  • newvals
    List of mapped values. Values that are smaller than a given threshold will be mapped to the first constant, and values that are larger than or equal to the next threshold will be mapped to the next constant. This list needs to be exactly 1 value longer than the list of threshold cutoff values. Example: threshold cutoff values = [5, 10]; new values = [0, 1, 2]. All data below 5 will now be 0, data between 5 and 10 will now be 1, data greater than 10 will now be 2 .

    • verbose name: New Values
    • default value: [0, 1]
    • port type: ListPort
    • value type: list (can be None)

Divide

Divide the data in the first input by the data in the second input (elementwise).

Note that the shape of the arrays must be the same for both data inputs.

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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data1
    Input data 1 (numerator).

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

    • verbose name: Data2
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • outdata
    Data to process.

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

EegQualityMetrics

Computes quality metrics for an EEG dataset/file (average for the entire dataset/file).

For offline (non-streaming) data only (expects an incoming packet to contain a full file/dataset to process). If multiple packets (datasets) are received in succession, (i.e., if multiple files are being processed), average metrics for all datasets will be generated if the concatenate files option is selected; the metrics for each individual dataset/file will be exported to CSV if that option is selected. (Non-EEG channels should be removed before running this node (i.e., using Assign Channel Locations and Remove Unlocalized Channels).

Version 2.2.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: IN
  • diag_flat_out
    Flatline channels (session average)

    • verbose name: Diag Flat Out
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • 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)
  • line_noise_frequency
    Frequency in Hz that line noise is expected due to AC power (e.g . USA is 60 Hz, Europe is 50 Hz). Use 'auto' to detect the mains frequency automatically.

    • verbose name: Line Noise Frequency (Hz)
    • default value: auto
    • port type: EnumPort
    • value type: object (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)
  • bad_channel_subset_size
    Size of random channel subsets to use. This is for use in a RANSAC estimator, and is given as a fraction of the total number of channels. Smaller subsets together with higher number of Ransac samples gives a more robust estimate, at increased computational cost during calibration.

    • verbose name: Bad Channel Subset Size
    • default value: 0.15
    • port type: FloatPort
    • value type: float (can be None)
  • bad_channel_num_samples
    Number of random channel subsets to use. This for use in a RANSAC estimator. Higher numbers together with smaller subset sizes give a more robust estimate, at higher computational cost during calibration.

    • verbose name: Bad Channel Num Samples
    • default value: 200
    • port type: IntPort
    • value type: int (can be None)
  • bad_channel_use_clean_window
    Use clean time windows for calibration for the bad channel metric computation. Setting this to False will flag channels as bad if they are across the entire file including time windows when the data is considered bad. Set to True (default) is a more stringent test that only flags channels as bad if they are deemed so (uncorrelated with neighboring channels, HF noise) during time windows when the data is considered "good" overall (other channels are ok).

    • verbose name: Bad Channel Use Clean Window
    • default value: True
    • port type: BoolPort
    • value type: bool (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. (For the Bad Channel setting, see bad_channel_use_clean_window.)

    • 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)
  • use_legacy
    Use legacy method for computing artifact ratio.

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

EstimateLag

Estimate the lag (delay) of the data in seconds, as computed by the difference between the timestamp of the incoming data and the LSL or wallclock time it was received.

This node is for use with online data only. The lag values are also output through a separate port with a Time x Feature axis. This node operates on signal streams only.

Version 0.8.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • lag
    Lag values.

    • verbose name: Lag
    • 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)
  • verbose
    Display lag in console with every tick.

    • verbose name: Verbose
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • threshold
    Lag threshold, in seconds. If the lag exceeds this threshold, an error message is printed to the log (and console). Set to 0 to ignore any threshold; this will log the log in the console if verbose is True but otherwise set no .

    • verbose name: Threshold
    • default value: 0.01
    • port type: FloatPort
    • value type: float (can be None)
  • popup_window
    Pop up a notification window when the threshold if exceeded. When set to false, an error is printed to the log stream only.

    • verbose name: Popup Window
    • default value: False
    • 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 (if verbose set to True).

    • 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)
  • metadata
    User-definable meta-data associated with the node.

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

ExtractChannels

Extract a list of the channel names from a data stream.

Version 1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: IN
  • channel_names
    Channel Names

    • verbose name: Channel Names
    • default value: None
    • port type: DataPort
    • value type: list (can be None)
    • data direction: OUT
  • stream
    Name of stream from which to extract the channel names. If blank will extract from the first stream.

    • verbose name: Stream
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • verbose
    Verbose output.

    • verbose name: Verbose
    • 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.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: EnumPort
    • value type: object (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 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.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: object (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.

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

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

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

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

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: 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)

InterpolateMissingChannels

Interpolate missing channels in the given data.

Given a list of desired channel labels, this node will attempt to produce an output signal that has all channels in that list, and will interpolate channels that are not present in the data if needed. The method used is spherical spline interpolation.

More Info...

Version 1.2.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • ref_data
    Reference data. Can be provided as an alternative to the desired_channels.

    • verbose name: Ref Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • desired_channels
    Desired channels. This node will attempt to ensure that the given channels are present in the output data and interpolate them if necessary. Ignored if ref_data provided.

    • verbose name: Desired Channels
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • montage_type
    Choose the montage to use from among a list of common options. If set to auto, the best-matching montage will be used.

    • verbose name: Montage Type
    • default value: auto
    • port type: EnumPort
    • value type: object (can be None)
  • montage
    Optionally a montage file (.l ocs format) to use. This may be a montage file that ships with Neuropype (available in resources/montages), in which case only the filename is needed, or the full path to a montage located elsewhere. If specified, this will take precedence over the montage type field.

    • verbose name: Montage File
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • additive_noise_scale
    Scale of additive noise. Optional scale factor for Gaussian noise that can be added to each interpolated channel to prevent rank deficiency. Scale is relative to the overall data's standard deviation (assuming that channels are zero mean).

    • verbose name: Additive Noise Scale
    • default value: 0
    • port type: FloatPort
    • value type: float (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.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • line_noise_frequency
    Frequency in Hz that line noise is expected due to AC power (e.g . USA is 60 Hz, Europe is 50 Hz)

    • verbose name: Line Noise Frequency (Hz)
    • default value: 60Hz
    • port type: EnumPort
    • value type: object (can be None)
  • 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)

Maximum

Take the elementwise maximum of the data in the first input and the data in the second input.

Note that the shape of the arrays must be the same for both data inputs. Note: the output array will have the same dimension as either input array, and at each position in the output array the value will be the maximum of the corresponding value in the first and the second input.

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)
  • metadata
    User-definable meta-data associated with the node.

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

    • verbose name: Outdata
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • verbose
    Verbose output.

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

Mean

Compute the mean (average) over a given axis.

The chosen axis will be removed from the data and replaced by a new one-element feature axis. In the special case that the mean is taken over time, frequency, or instances, a dummy time/frequency/instance axis will be retained, unless this behavior is overriden using the force feature axis parameter. It is also possible to compute a robust variant of the mean instead.

More Info...

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 over which to calculate the average. This axis will drop out of the data and be replaced by a dummy one-element axis (of type feature or time, depending on settings).

    • verbose name: Axis To Average Over
    • default value: instance
    • port type: EnumPort
    • value type: object (can be None)
  • robust
    Use robust estimator (median). Enabling this will make the node more robust to outlier elements, but if the data is clean, then the statistic will be somewhat less precise than it it could be.

    • verbose name: Use Robust Estimator
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • force_feature_axis
    Always create a feature axis, even when the mean is taken over time. If this is False, then a time axis will instead be created if the mean is taken over time.

    • verbose name: Force Creation Of Feature Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (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)
  • robust_estimator_type
    Type of robust estimator to use.

    • verbose name: Robust Estimator Type
    • default value: median
    • port type: EnumPort
    • value type: object (can be None)
  • trim_proportion
    Proportion to trim for trim_mean estimator. Applied to both the smallest and largest values in the data.

    • verbose name: Trim Proportion
    • default value: 0.1
    • port type: FloatPort
    • value type: float (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

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

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

MultitaperSpectrum

Calculate the power spectrum of the given data using the Multi-taper method.

This is a high-quality spectral estimator, which averages the spectrum over multiple reweighted ("tapered") windows. The spectrum can be smoothed by increasing the time-halfbandwidth product parameter, which yields a less noisy spectrum. There is also an alternative drop-in replacement for this node, called Power Spectrum (Welch), that uses a different method that is slightly faster to compute but yields somewhat lower-quality spectra. The most common use case for either node is to apply it to segmented data (i.e., following the Segmentation node), which will compute the spectrum for each segment of the data. Another use case is to apply it in an offline fashion on an entire recording (which yields the average power spectrum of that recording). It is not useful to apply this node on streaming data without any buffering or segmentation, because this would try to estimate the spectrum on the very short chunks of data without any averaging across chunks, yielding bad data. There is a node that was specifically made for this task, called Moving window Multitaper spectrum, and this will yield much better results in this scenario. At a technical level, this node will replace the time axis of the data by a frequency axis (since time is averaged out), but it will add a dummy time axis with one entry that is annotated with the average time value of the former time axis (this is so that that information is not lost). If you need to remove this axis, e.g., because some subsequent node cannot handle multiple axes in the data, you can use the Fold Into Axis node to fold it into some other axis (usually that would be space, i.e., channels). This node accepts both continuous signals and sparse events as its input.

More Info...

Version 1.2.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • half_bandwidth
    Time-halfbandwidth product parameter of the multi-taper method. Larger values yield smoother spectra, and typical values for segmented data are in the 2-5 range (going to as high as 20). By default, this is used to determine the number of tapers that should be averaged (as 2*time_halfbandwith-1).

    • verbose name: Time-Halfbandwith Product
    • default value: 2.5
    • port type: FloatPort
    • value type: float (can be None)
  • num_tapers
    Override number of tapers. If the value is not given, then the maximum number of tapers according to the time-halfbandwith parameter is used. If given, more tapers yield smoother spectra.

    • verbose name: Override Number Of Tapers
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • nfft
    FFT Size. Allows for oversampling in the frequency domain for a smoother appearance.

    • verbose name: Fft Size (Oversampling)
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • onesided
    Return one-sided spectrum if the input data is real-valued. For complex data, the spectrum is always two-sided. One may set this to false in order to get data that is formatted the same way as for the complex case, but the extra values are redundant in this case.

    • verbose name: Onesided Spectrum For Real-Valued Data
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • average_over_time_window
    If set the final spectrum is averaged over time-window. The time-window axis is an axis introduced by shifted windows node. In case of calculating the spectrum of a time series on offline mode we do not want to add the result over the time-window axis. However, if we are calculating the spectrum of an epoched data and we average over time-window specially if we want to later plot or further analyze the data

    • verbose name: Average Over Time Window
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

NirsIntensityQualityMetrics

Compute various quality metrics from NIRS "raw" Intensity signal data.

The quality metric values themselves are stored in a Feature axis along with a corresponding _mask feature that contains a 1 or a 0 depnding on where the channel passed that criteria (is "good") or not. For example, a Feature axis might contain 'snr', 'snr_mask' where the former has the snr values for each channel, and the latter a 1 or 0 for each channel depending on whether it was below the threshold. The time axis is dropped on the output. This node expects a chunk with space and time axes, the Metadata.quantity property set to 'intensity' and the Origin.modality set to 'NIRS'.

Version 0.6.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • zscore_threshold
    Max acceptable z-score of the raw intensity. Channels having an absolute z-score below this are marked "good".

    • verbose name: Zscore Threshold
    • default value: 4
    • port type: FloatPort
    • value type: float (can be None)
  • snr_threshold
    The robust intensity raw signal-to-noise (SNR) threshold, calculated in dB, above which a channel is marked "good".

    • verbose name: Snr Threshold
    • default value: 30
    • port type: FloatPort
    • value type: float (can be None)
  • cv_threshold
    The coefficient of variation (CV) threshold, expressed as a percentage, below which a channel is marked as "good".

    • verbose name: Cv Threshold
    • default value: 7.5
    • port type: FloatPort
    • value type: float (can be None)
  • abs_threshold
    Max acceptable range for the raw intensity, specified as a 2-value list of the lower and upper bounds. Channels having a trimmed mean intensity (0.1) outside of this range are marked as bad.

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

NirsOpticalDensityQualityMetrics

Computes various quality metrics from NIRS data that has been converted to optical density.

This should be preceded with the node IntensityToOpticalDensity. This expects a stream where the Metadata.quantity is set to Quantities.optical_density and Origin.modality set to Modalities.NIRS. This should be set by your importer but otherwise you can use SetStreamProperties to set it.

Version 0.3.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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_flatline
    All-flat channels.

    • verbose name: Diagnostic Flatline
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_saturation
    Saturating channels.

    • verbose name: Diagnostic Saturation
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_motion
    Motion-artifact presence in channels.

    • verbose name: Diagnostic Motion
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_explainedvar
    Variance explained due to various processes, by channel.

    • verbose name: Diagnostic Explainedvar
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_anticorr
    HbO/HbR anti-correlation in channels (higher is better).

    • verbose name: Diagnostic Anticorr
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • diagnostic_motionprofile
    Motion profile over time (not per-channel).

    • verbose name: Diagnostic Motionprofile
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • correlate_streams
    Additional streams that shall be used to calculate variance explained by the measures therein.

    • verbose name: Correlate Streams
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • exclude_shortsep
    Exclude short-spearation channels with a distance below this threshold in mm. If set to 0, no channels are excluded from the plots. A typical value is 15.

    • verbose name: Exclude Short-Separation Channels
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • average_wavelengths
    Average measures over wavelengths.

    • verbose name: Average Wavelengths
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • mayer_band
    Frequency range for Mayer waves.

    • verbose name: Mayer Band
    • default value: [0.06, 0.14]
    • port type: ListPort
    • value type: list (can be None)
  • respiration_band
    Frequency range for respiration effects.

    • verbose name: Respiration Band
    • default value: [0.2, 0.33]
    • port type: ListPort
    • value type: list (can be None)
  • cardiac_band
    Frequency range for cardiac cycle.

    • verbose name: Cardiac Band
    • default value: [1, 1.6]
    • port type: ListPort
    • value type: list (can be None)
  • skip_explained_var
    Skip the variance explained quality metrics. These can require significant compute resources depending on the size of your file.

    • verbose name: Skip Explained Var
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • hp_cutoff
    Frequency cutoff (lower bound) for highpass filter. Leave empty to skip highpass filter.

    • verbose name: Hp Cutoff
    • default value: [0.01, 0.02]
    • port type: ListPort
    • value type: list (can be None)
  • lp_cutoff
    Frequency cutoff (upper bound) for lowpass filter. Leave empty to skip lowpass filter.

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

NoDataAlert

Alert if no data is present.

Checks that data is coming through the pipeline, and gives a user alert using a popup window or log message in cases where either no data (Packets are either None or contain no data), has come through for a configurable amount of time.

Version 0.10.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • 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 0 will not check any marker streams for data.

    • verbose name: Markers Allowed Gap
    • default value: 0
    • 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)
  • popup_window
    Pop up a notification window when no data is found after the number of seconds in the allowed_gap parameter. When set to false a message is printed to the log stream only.

    • verbose name: Popup Window
    • default value: False
    • port type: BoolPort
    • value type: bool (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.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • 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_props
    Print stream properties (chunk props).

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

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.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)
  • metadata
    User-definable meta-data associated with the node.

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

    • verbose name: Gather This Much Calibration Data
    • default value: 15
    • 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)

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.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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (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', 'time']
    • port type: ListPort
    • value type: list (can be None)
  • axis_labels
    Axis labels. This is a dictionary, where the keys are numeric values matching the position of the axis in the axis types field (starting with 0). Each value is a list of the labels for that axis (and should match its length specified in the matrix dimensions. For a time axis, these will be the times.

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

RemoveBadTimeWindows

This function cuts segments from the data which contain high/low-amplitude artifacts.

Specifically, any windows with more than a certain fraction of "bad" channels are removed, where a channel is bad in a given window if its amplitude in the window is above or below a given upper/lower threshold (in standard deviations from a robust estimate of the EEG amplitude distribution for the channel). This node only operates on non-streaming data.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 indicating the time windows with clean data.

    • verbose name: Diagnostic
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • kept_samples
    dict with chunk names for keys and time-axis selector as values. This output is useful to slice another parallel chunk to keep it the same size, even though its channels should not be used to determine bad time windows.

    • verbose name: Kept Samples
    • default value: None
    • port type: DataPort
    • value type: dict (can be None)
    • data direction: INOUT
  • zscore_thresholds
    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: Maximum Fraction Of Bad Channels
    • default value: 0.2
    • port type: FloatPort
    • value type: float (can be None)
  • window_len
    Length of sliding window. This is the window length used to check the data for artifact content, in seconds. This is ideally as long as the expected time scale of the artifacts but short enough to allow for several 1000 windows to compute statistics over.

    • verbose name: Window Length
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • window_overlap
    Window overlap fraction. The fraction of two successive windows that overlaps. Higher overlap ensures that fewer artifact portions are going to be missed, in expense of being slower.

    • verbose name: Window Overlap Fraction
    • default value: 0.66
    • port type: FloatPort
    • value type: float (can be None)
  • max_dropout_fraction
    Maximum fraction of windows with signal dropouts. This is the maximum fraction of time windows that may have arbitrarily low amplitude (e.g., due to the sensors being unplugged). This parameter is used in generalized Gaussian distribution fitting.

    • verbose name: Maximum Fraction Of Dropout Windows
    • default value: 0.1
    • port type: FloatPort
    • value type: float (can be None)
  • min_clean_fraction
    Minimum fraction of clean windows. This is the minimum fraction of time windows that need to contain uncontaminated EEG.This parameter is used in generalized Gaussian distribution fitting.

    • verbose name: Minimum Fraction Of Clean Windows
    • default value: 0.25
    • port type: FloatPort
    • value type: float (can be None)
  • truncate_quantile
    Truncated Gaussian quantile. Upper and lower quantile range of the truncated Gaussian distribution that shall be fit to the EEG contents. This parameter is used in generalized Gaussian distribution fitting.

    • verbose name: Truncated Gaussian Quantile
    • default value: [0.022, 0.6]
    • port type: ListPort
    • value type: list (can be None)
  • step_sizes
    Grid search stepping. Step size of the grid search. the first value is the stepping of the lower bound (which essentially steps over any dropout samples), and the second value is the stepping over possible scales (i.e., clean-data quantiles). This parameter is used in generalized Gaussian distribution fitting.

    • verbose name: Grid Search Step Size
    • default value: [0.01, 0.01]
    • port type: ListPort
    • value type: list (can be None)
  • shape_range
    Shape parameter range. Search Range for the clean EEG distribution's shape parameter beta. This parameter is used in generalized Gaussian distribution fitting.

    • verbose name: Range For Shape Parameter
    • default value: [1.7, 1.8499999999999999, 1.9999999999999998, 2.1499999999999995, 2.3, 2.4499999999999993, 2.5999999999999996, 2.749999999999999, 2.8999999999999995, 3.049999999999999, 3.1999999999999993, 3.3499999999999988, 3.499999999999999]
    • port type: ListPort
    • value type: list (can be None)

ReplaceNans

Replace NaN values in the data by a given value.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • value
    Value to replace NaNs with.

    • verbose name: Value To Replace Nans With
    • default value: 0.0
    • port type: FloatPort
    • value type: float (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.0.3

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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: EnumPort
    • value type: object (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: object (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: object (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)

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 0.1.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)
  • metadata
    User-definable meta-data associated with the node.

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

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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (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)

Scaling

Scale each element of the data by a constant factor.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
    Scaling factor. Each element of the data is scaled by this factor.

    • verbose name: Factor
    • default value: 1.0
    • port type: FloatPort
    • value type: float (can be None)

SelectRange

Select a subset of the given data along any axis, such as space (channels), time, frequency, instances (segments), or features.

This node will take any nonempty chunk that has the desired axis, and then extract the desired selection range. The range can be given in a variety of formats and units.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 select. Use the space axis when you want to select channels, the instance axis to select trials or segments, the feature axis when the data happens to contain features (e.g., after feature extraction), or time and frequency axes. Note that in many cases you will want to use a different unit of measurement than the default indices. Select instance-fields to drop columns from the instance data recarray.

    • verbose name: Select Along Axis
    • default value: time
    • port type: EnumPort
    • value type: object (can be None)
  • selection
    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: Selection Range
    • default value: :
    • port type: Port
    • value type: object (can be None)
  • 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' -- all you need to do for this is set the unit to 'names'.

    • verbose name: Unit Of Measurement For Selection
    • default value: indices
    • port type: EnumPort
    • value type: object (can be None)
  • apply_multiple_axes
    Apply the select range to all occurrences of the axis in the data.

    • verbose name: Apply To All Occurrences Of Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • apply_time_selection_to_markers
    Apply the time-axis selection to the instance axis of any accompanying marker streams.

    • verbose name: Apply Time Selection To Markers
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

Shift

Add a given value to each element of the 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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • offset
    Shift offset. This is the value that shall be added to every element of the given data.

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

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

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

SignalToNoise

Signal to noise, computed as the log ratio of signal (filtered) and noise (unfiltered - filtered) data segments, with a baseline removed.

Expects the data to contain event markers which will be used to create the segments on which the SnR is computed, for example, markers indicating the start of a trial. The markers in question should already be assigned as targets (using AssignTargets) or be the only markers remaining in the data (using SelectInstances). For each filtered segment, baseline of a specified length immediately preceeding the event marker is subtracted prior to filtering. The signal to noise ratio is stored in a Feature axis with the label "SNR". The measure is averaged over time and the Time axis is removed. The original signal data is not passed through. For offline, non-segmented data only. If this is to be computed on a particular stream only, use ExtractStreams before this node to separate that stream along with the event marker stream.

Version 0.9.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • frequency_range
    Frequency range representing the range within which the target signal is typcially found, depending on the modality. For example, for HbO/HbR concentration (NIRS), this would typically be [0.01, 0.1].

    • verbose name: Frequency Range
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • signal_segment_length
    The length, in seconds, of the "signal" segments, starting from the target event markers (which should already be assigned as targets prior to this node or be the only markers remaining in the packet). These are the segments on which the signal to noise ratio will be computed. This same value is also used extract the baseline segment of equal length immediately preceeding the signal segment (therefore, immediately preceeding the target event markers) that will be subtracted from the signal segment.

    • verbose name: Signal Segment Length
    • default value: 0
    • port type: FloatPort
    • value type: float (can be None)

SquareRoot

Take the square root of each element in the data.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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

SqueezeAxes

Strip all axes with len == 1.

See also StripSingletonAxis to restrict axis removal to a single specified axis.

Version 1.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)
  • metadata
    User-definable meta-data associated with the node.

    • 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
  • verbose
    Print a list of the original axes and those remaining.

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

Sum

Compute the sum along a given axis.

The chosen axis will be removed from the data and replaced by a new one-element feature axis. In the special case that the mean is taken over time, a dummy time axis will be retained, unless this behavior is overriden using the force feature axis parameter.

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)
  • metadata
    User-definable meta-data associated with the node.

    • 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 over which to calculate the sum. This axis will drop out of the data and be replaced by a dummy one-element axis (of type feature or time, depending on settings).

    • verbose name: Axis To Sum Over
    • default value: instance
    • port type: EnumPort
    • value type: object (can be None)
  • axis_occurrence
    Index of the occurrence of the axis of desired type. (0 is the first axis of the desired type, 1 is the second, -1 is the last, -2 is the second-to-last, and so on).

    • verbose name: Axis Occurrence
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • force_feature_axis
    Always create a feature axis, even when the sum is taken over time. If this is False, then a time axis will instead be created if the sum is taken over time.

    • verbose name: Force Creation Of Feature Axis
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

TopoPlotViewer

Plot EEG electrodes on head cartoon with different colors based on desired metric.

In discrete case define a set of boundary values and the color assigned to each section.

Version 1.1.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)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to display.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • title
    Figure identifier. This identifier referenced in report templates.

    • verbose name: Title
    • default value: Electrode Metric Plot
    • port type: StringPort
    • value type: str (can be None)
  • head_option
    Flag to plot head cartoon.

    • verbose name: Plot Head
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • head_rad
    Drawing radius (arc_length) for the cartoon head. Note that only head_rad = 0.5 is anatomically correct.

    • verbose name: Head Rad
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • plot_rad
    Maximum radius of channels to be plotted. If plot_rad > 0.5, channels with arc_length > 0.5 (i.e. below ears-eyes) are plotted in a circular 'skirt' outside the cartoon head.

    • verbose name: Plot Rad
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • head_color
    Head color.

    • verbose name: Head Color
    • default value: black
    • port type: StringPort
    • value type: str (can be None)
  • head_line_width
    Linewidth used for head, nose, ears

    • verbose name: Head Line Width
    • default value: 2
    • port type: IntPort
    • value type: int (can be None)
  • head_ring_width
    Width of the cartoon head ring.

    • verbose name: Head Ring Width
    • default value: 0.007
    • port type: FloatPort
    • value type: float (can be None)
  • head_axes_scfac
    Head to axes scaling factor.

    • verbose name: Head Axes Scfac
    • default value: 1.3
    • port type: FloatPort
    • value type: float (can be None)
  • background_color
    Background color

    • verbose name: Background Color
    • default value: white
    • port type: StringPort
    • value type: str (can be None)
  • value_discrete
    If set, the metric used for electrode values is considered to be discrete, and different levels and colors assigned to each level can be further defined.

    • verbose name: Value Discrete
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • value_range
    In case the values are discrete, the range includes the allowable levels of the metric. Otherwise, the two element list indicate the values assigned respectively to the minimum and maximum of the color limit.

    • verbose name: Value Range
    • default value: [0.95, 1.0]
    • port type: ListPort
    • value type: list (can be None)
  • color_range
    Color levels for discrete-valued plots.

    • verbose name: Color Range (Discrete-Valued)
    • default value: ['red', 'green']
    • port type: ListPort
    • value type: list (can be None)
  • color_range_cont
    Color map for continuous-valued plots.

    • verbose name: Color Range (Continuous-Valued)
    • default value: RdYlGn
    • port type: EnumPort
    • value type: object (can be None)
  • disk_scale
    The value used to scale the electrode disks.

    • verbose name: Disk Scale
    • default value: 150
    • port type: FloatPort
    • value type: float (can be None)
  • add_colorbar
    If set the color bar is added to the plot.

    • verbose name: Add Colorbar
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • color_bar_ticks_values
    List of the ticks values for the color bar.

    • verbose name: Color Bar Ticks Values
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • color_bar_ticks_labels
    List of the ticks labels for the color bar.

    • verbose name: Color Bar Ticks Labels
    • default value: None
    • port type: ListPort
    • value type: list (can be None)
  • use_custom_colormap
    Can be used to activate custom color maps. Used for statistically thresholded plots.

    • verbose name: Use Custom Colormap
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • canvas_sizes
    Canvas size for the plot in inches. This is relevant when printing the figure.

    • verbose name: Canvas Sizes
    • default value: [7, 5.25]
    • port type: ListPort
    • value type: list (can be None)
  • canvas_dpi
    Canvas DPI. Determines print resolution.

    • verbose name: Canvas Dpi
    • default value: 100
    • port type: IntPort
    • value type: int (can be None)
  • always_on_top
    Window should be always on top. If this is enabled, then the window will not be occluded by other windows.

    • verbose name: Always On Top
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • show_toolbar
    Whether to show the window toolbar.

    • verbose name: Show Toolbar
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • initial_dims
    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: [50, 50, 700, 500]
    • port type: ListPort
    • value type: list (can be None)