Individual Session Spectral Analysis Report
Description¶
Performs a spectral analysis of a recorded session (resting state or a user performing a task). Preprocesses/cleans the data (high/low-pass filtering, removing bad time windows, artifacts, etc.), and computes power band values at both the channel and source level (using sLoreta for spectral decomposition). Outputs an .html report and .mat file with results.
Input / Output¶
This pipeline expects one file, 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).
task_name¶
The name of the task, used in your report heading.
Trimming¶
If your sessions contains data before and after the task which you don't want to include in the session averages, you can use the parameters in this section to trim the data.
use_markers¶
If set to True, the data will be trimmed to the markers indicated in the parameters below.
use_time_trim¶
If set to True, the data will be trimmed to the time points indicated in the parameters below.
marker_startname¶
If use_markers is set to True, the name of the marker indicating the start of the segment to be processed (data before this marker will be trimmed).
marker_start_occurence¶
If there are multiple instances of the marker_startname marker, specify the occurance of the marker to use. First occurrence is 0, seconds is 1, and so on.
marker_endname¶
If use_markers is set to True, the name of the marker indicating the end of the segment to be processed (data after this marker will be trimmed).
marker_end_occurence¶
If there are multiple instances of the marker_startname marker, specify the occurance of the marker to use. Last occurrence is -1, second to last is -2, and so on.
time_trim_start¶
Start time (in seconds), relative to the start of the file. Data before this time point will be trimmed. Only takes effect if use_time_trim is True.
time_trim_end¶
End time (in seconds), relative to the start of the file. All data after this time point will be trimmed. Only takes effect if use_time_trim is True.
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.
do_preprocessing¶
Whether or not to preprocess data first. This should usually be True, unless the data has already been preprocessed (filtered, rereferenced, cleaned, etc.)
channels_to_import¶
List of channels to process. Can be a comma-separated list of channel names (Example: 'Fz', 'Cz'), or a range of channel indexes (Example: 0...4 will select the first 5 channels, the first channel is 0). Non-signal channels are automatically excluded so this is only needed in case of certain channels (such as reference channel or non-EEG channel) are in your data and should not be processed. Use (all) or empty to process all channels.
channel_names¶
You can rename the incoming channels by specifying a list of channel names here, which will overwrite the incoming channel names. There should be one label for each channel in data set AFTER filtering by the list of channels to import specified in that parameter.
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.
rereferencing¶
Rereferences the data. For common average referencing, enter: (all) (for all channels). To reference to certain channels, a comma-separate list of channel names can be entered (these must appear in the data) (example: 'LE1', 'LE2'). If specifying a single channel, it must be placed in brackets, with the channel name in single quotes (example: ['LE1']). To NOT perform rereferencing, leave empty.
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.
scale_factor¶
Scale the data by this factor. Can be used to manually convert the data to uV, which is the unit expected by this pipeline. Set to 1 for no scaling.
save_to_hdf5¶
Whether to save the preprocessed/cleaned data to HDF5 format. This will output a separate file with the same name and an .h5 extension. Enter True or False.
Output¶
This pipeline generates a report in HTML format that contains the following:
- Analysis by Channels
- Power Spectra (line plots)
- BandPower (bar plots)
- Bands / Ratios (topoplots)
- Statistics Tables
- Analysis by Sources
- Power Spectra (line plots)
- BandPower (bar plots)
- BandPower Ratios (cortex plots)
- Statistics tables
- Connectivity Analysis
- Connectivity diagrams
- Statistics tables
Also exported is .mat (Matlab format) file with all the computed values and statistics for further analysis if desired.