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.1
Ports/Properties¶
data¶
Data to process.
diagnostic¶
Diagnostic information indicating the time windows with clean data.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.