Skip to content

← diagnostics package

EEGQualityScore

Automated EEG quality scoring per channel based on weighted quality metrics.

This node expects raw or pre-processed EEG (set skip preprocessing=True for the latter). The continuous time series data will be epoched into specified time window lengths, and for each epoch (along a new instance axis) a score will be assigned for each of 5 criteria/metrics, for each channel independantly, and placed in a new feature axis, where each element in the feature axis is labeled with the feature (in the .names field): flatline, mean_abs_amplitude, median_abs_amplitude, std_abs_amplitude, delta-alpha. (See node properties for descriptions of these.) The time axis is removed from the packet. The results are output through the data port. This node also outputs the quality criteria/metric values for each epoch that were used to generate the scores, through a separate diagnostics port, if you need the details. This node is primarily designed for low density (e.g. single channel) EEG devices in which more traditional quality assessment methods (see BadChannelRemoval, ChannelDiagnostics) are not feasible. Version 0.9.0

Ports/Properties

data

Data to process.

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

diagnostic_values

Computed diagnostic values per epoch for each channel that were used to assign ratings based on specified ranges.

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

skip_preprocessing

Skip all preprocessing, filtering or cleaning of the data. Check this box if the data is already preprocessed and ready for analysis. If not skipped this node will apply basic preprocessing/filtering before computing scores based on criteria.

  • verbose name: Skip Preprocessing
  • default value: False
  • port type: BoolPort
  • value type: bool (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]
  • 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 Stop Atten
  • default value: 120.0
  • port type: FloatPort
  • value type: float (can be None)

lowpass_frequencies

High noise frequencies to be filtered out with a lowpass 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: Lowpass Frequencies
  • default value: [45, 50]
  • port type: ListPort
  • value type: list (can be None)

lowpass_stop_atten

Minimum attenuation in stopband for the lowpass filter. This is the minimum acceptable attenuation, in dB, in the stopband, which is ideally infinitely suppressed, but in practice 30-80 dB are often enough unless there is enormous drift (e.g., with some dry headsets).

  • verbose name: Lowpass Stop Atten
  • default value: 120.0
  • port type: FloatPort
  • value type: float (can be None)

win_len

Epoch window length in seconds. The input data in continuous time will be epoched into equal sized successive windows (without overlap) and each specified criteria set will be computed on each epoch individually. The output data will replace the time axis with an instance axis for each epoch of the desired window length.

  • verbose name: Epoch Window Length
  • default value: 10
  • port type: FloatPort
  • value type: float (can be None)

flatline_score

Specific score designated for flat-line channels. If set, the data will first be checked for flat-line channels (no signal) and assigned this value. Leave empty if no flat-line checking is desired.

  • verbose name: Flatline Score
  • default value: 0
  • port type: StringPort
  • value type: str (can be None)

amplitude_criteria

EEG (absolute value) amplitude (uV) cutoff ranges. The input raw data will be zero-median centered and bandpass filtered in order to remove drift and line noise. Each key is a quality rating and the values are specified in a list pair from min (inclusive) to max (exclusive). For example, '6: [60,70]': mean absolute amplitudes greater than or equal to 60 and less than 70 uV will receive a 6 quality score.

  • verbose name: Amplitude Criteria
  • default value: {'1': [400, inf], '2': [200, 400], '3': [90, 200], '4': [70, 90], '5': [60, 70], '6': [45, 60], '7': [35, 45], '8': [30, 35], '9': [25, 30], '10': [0, 25]}
  • port type: DictPort
  • value type: dict (can be None)

amplitude_std_criteria

EEG (absolute value) amplitude standard deviation (uV) cutoff ranges. The input raw data will be zero-median centered and bandpass filtered in order to remove drift and line noise. Each key is a quality rating and the values are specified in a list pair from min (inclusive) to max (exclusive). For example, '6: [30,40]': standard deviations greater than or equal to 30 and less than 40 uV will receive a 6 quality score.

  • verbose name: Amplitude Std Criteria
  • default value: {'1': [70, inf], '2': [60, 70], '3': [50, 60], '4': [40, 50], '5': [30, 40], '6': [25, 30], '7': [20, 25], '8': [15, 20], '9': [10, 15], '10': [0, 10]}
  • port type: DictPort
  • value type: dict (can be None)

central_tendency_criteria

EEG (absolute value) amplitude difference between mean and median values cutoff ranges. The input raw data will be zero-median centered and bandpass filtered in order to remove drift and line noise. Each key is a quality rating and the values are specified in a list pair from min (inclusive) to max (exclusive). For example, '6: [20,30]': abs(mean - median) values greater than or equal to 20 and less than 30 uV will receive a 6 quality score.

  • verbose name: Central Tendency Criteria
  • default value: {'1': [80, inf], '2': [60, 80], '3': [40, 60], '4': [30, 40], '5': [20, 30], '6': [10, 20], '7': [5, 10], '8': [3, 5], '9': [1, 3], '10': [0, 1]}
  • port type: DictPort
  • value type: dict (can be None)

delta_alpha_diff_criteria

EEG spectral power (PSD) difference between delta and alpha bands cutoff ranges. Each key is a quality rating and the values are specified in a list pair from min (inclusive) to max (exclusive). For example, '6: [50,70]': delta - alpha PSD values greater than or equal to 50 and less than 70 will receive a 6 quality score.

  • verbose name: Delta Alpha Diff Criteria
  • default value: {'1': [400, inf], '2': [200, 400], '3': [100, 200], '4': [70, 100], '5': [50, 70], '6': [35, 50], '7': [25, 35], '8': [15, 25], '9': [5, 15], '10': [-inf, 5]}
  • port type: DictPort
  • value type: dict (can be None)

set_breakpoint

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

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

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