Description¶
Performs an ERP/ERN analysis of an individual session of a event-related task with multiple trials of two event types. Includes ERP waveforms, ERP Peak amplitudes/latencies, ERSP (event related spectral perturbation) plots, spectra, and bandpower (for both channels and sources). The file must contain at least two event markers for each trial type.
Report sections¶
This pipeline generates a report in HTML format that contains the following:
- Analysis by Channels
- ERP Trials (image plots)
- ERP waveforms (line plots)
- ERP Peak Amplitude/Latency (line plots)
- ERSP (spectrograms)
- Power Spectra (line plots)
- BandPower (bar plots)
- Bands / Ratios (topoplots)
- Statistics Tables
- Analysis by Sources
- ERP Trials (image plots)
- ERP waveforms (line plots)
- ERP Peak Amplitude/Latency (line plots)
- ERSP (spectrograms)
- Power Spectra (line plots)
- BandPower (bar plots)
- BandPower Ratios (cortex plots)
- Statistics tables
- Connectivity Analysis
- Connectivity diagrams (ribbons)
- Statistics tables
PARAMETERS¶
Category: Input¶
This pipeline expects one file (or a Path Iterator formatted path name) and its path is relative to your Neuroscale account storage bucket. (The easiest way to run it is to go to your Storage page, select the file, click the Task button which will take you to the Create Task page, and then select this pipeline. The filename will be filed in automatically.)
input path¶
The path to the file to be processed (see above).
skip if exists¶
Skip re-processing and re-generating a report if a report is already found to exist in the S3 bucket path.
task name¶
The name of the task, used in your report heading and section text.
stream names¶
Names of the streams to extract. Default is [\'eeg\', \'markers\'].
Category: Output¶
The pipeline will automatically generate a .html report into the same path as the input file using an appropriate tag to indicate the type of report that was run. There are additional optional outputs one can choose to save out.
export pkl¶
Whether or not to export a .pkl format structure file of session means. These files are needed from individual session analyses if the dataset will be used in a group analysis pipeline.
Category: Preprocessing¶
This pipeline preprocesses the EEG data including:
- high and low pass filtering
- rereferencing
- removing and reinterpolating bad channels
- removing bad time windows
- cleaning artifacts
- de-jittering timestamps
- rescaling
- Parameters for some of these functions are included in this section.
skip preprocessing¶
Whether or not to skip the preprocessing stage. This should usually be False, unless the data has already been preprocessed (filtered, rereferenced, cleaned, etc.) and the input file is this preprocessed version of the data.
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.
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.
desired sampling rate¶
Target sampling rate (in Hz). If you want to resample the data, specify the sampling rate here. Leave empty to not performing resampling.
bad channel correlation 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 as it is based on each channel's positional neighbors.
skip artifact removal¶
Skip artifact and bad time window removal.
Category: Events¶
condition criteria¶
Dictionary of event conditions using marker stream. This is a nested dictionary with the first level being the condition names you want to create. Each condition name needs to have a second dictionary in which the following keys names are used 'trial_start', 'trial_end', 'trial_criteria', and 'event_to_match'. The 'trial_start' value should be the marker name of the start of each trial (e.g. 'trial-begin'). The 'trial_end' value should be the marker name of the end of each trial (e.g. 'trial-end'). The 'trial_criteria' value is a list of markers that must be included between the specified 'trial_start' and 'trial_end' markers in order to be labels with the desired condition name (e.g. [\'congruent-stimulus\', \'response-received*\', \'response-was-correct\']). The 'event_to_match' value should be the marker name in the 'trial_criteria' list that the desired condition name will match to. For instance, if one wants to do event-related potential analysis with timings locked to stimulus onset then use the marker name that corresponds to the stimulus onset. If one wants to do event-related negativity with timings locked to response onset then use the marker name that corresponds to the response.
assign targets¶
Mapping of matching criteria (e.g., marker strings) to target values. Any instances that match a given criterion will be assigned the associated target value. The mapping should be a dictionary of {crit1: target-value1, crit2: target-value2, ...}. These target events will be the trial onset anchors for segmenting ERPs/epochs.
target group¶
Dictionary of grouped event types for each condition. Set each condition name as a key with a list of target events to combine (e.g. {'condition1': [\'event1\', \'event2\']}). This can also be used to rename the target events (e.g. {'new_event_name': [\'event1\']}). By grouping different event types together the averages for the plots will reflect the combined groupings.
Category: Style¶
style figure font¶
Font to be used throughout the report
Category: Statistics¶
winsorize¶
Winsorization is the transformation of statistics by limiting extreme values in the statistical data to reduce the effect of possibly spurious outliers. If true, outlier values will be replaced by the mean when taking means over the individual trials.
trim proportion¶
Proportion of data instances to trim (per variable) on the lower and upper tails of the data. If only a single number is provided then it is used for both lower and upper. If no non-zero numbers are provided then no trimming is performed (default). For example, [0.05, 0.05] will remove and replace the least and greatest 5% of extreme data values with the mean.
error type¶
std: standard deviation
sem: standard error of the mean
var: variance
mad: median absolute difference
CI: confidence interval
CI range¶
Range for confidence interval if 'CI' selected as error_type. This is a proportion (between 0 and 1) such that 0.95 is the 95% confidence interval.
ttest mcc¶
Whether to correct for multiple comparisons using False Discovery Rate (FDR).
pval threshold¶
P-value to determine significance level. Values below specified threshold (e.g. 0.05) will be considered significant for statistics.
Category: ERP¶
erp time bounds¶
Time range in seconds relative to the target event (typically stimulus or response onset), within which data will be selected to represent the individual trials. Express in this format: [-1.5, 2] (will select from 1.5 seconds before the event to 2 seconds after).
erp baseline range¶
Time range (in seconds) representing the baseline to be removed from the data relative to target event. Note these values need to be within the bounds of the erp_time_boundswindow.
erp lowpass cutoff¶
Low-pass filter transition band (optional). If given, the data will be low-pass filtered if continuous. Note a previous low-pass filter may have been applied during pre-processing so this value should not be higher than that filter.
erp stimulus locked¶
Whether ERP is based on stimulus onset or not. If True, report text will reflect stimulus-locked ERP components. Use False if locking ERP onset to responses. In this case report text will reflect response-locked, error-related negativity (ERN) components. This setting only adjusts the report text, the actual marker used for event onset is determined by the condition criteria parameters.
erp peak range¶
Time window in seconds relative to target event for which to analyze peaks.
erp peak negative¶
If True, search for negative peaks (e.g. N2 component) instead of positive peaks (e.g. P3 component).
erp peak use peakfinding¶
If True, use wavelet-based approach for determining peaks. If False, use min/max amplitude.
Category: ERSP¶
ersp window length¶
Length of the sub-windows for spectral estimation, in seconds. 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.
ersp overlap¶
Overlap between successive sub-windows, expressed as a fraction of the sub-window length. This determines by how much successive sub-windows are overlapped. Using a higher value will yield finer stepping in time without a change in temporal or frequency detail (since the time axis will be correspondingly more smooth to counter the finer stepping). If not given, defaults to half of the sub-window length.
ersp spectrogram fft¶
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.
ersp freq range¶
Frequency range (in Hz) for which to plot the ERSP.
Category: Spectra¶
spectra method¶
Method to use for estimating power spectral density. Options are ['Multitaper', 'Welch', 'Spectrogram']['Multitaper', 'Welch', 'Spectrogram'].
spectra segmentation window¶
Time range in seconds relative to the target event (typically stimulus or response onset), within which data will be selected to compute spectra. Express in this format: [0, 3] (will select from target event onset to 3 seconds after).
Category: Topoplot¶
topoplot colormap¶
Colormap to use for plotting.
Category: 3D Cortex Plot¶
cortex plot colormap¶
Colormap to use for plotting.
cortex plot limits¶
Limits to use for scaling color map. 'absmax': scale map colors to +/- the absolute max after saturation. 'maxmin': scale map colors to the data range after saturation
Category: Source Localization¶
roi mapping¶
Dictionary of Regions of Interest (ROIs) and the vertices to group together.