Skip to content

2-Session T-test Spectral Analysis Report

Description

Performs a spectral analysis and T-test comparison of two sessions of the same task (such as the same subject doing a resting state task before and after an intervention). Performs a spectral analysis and computes power band values for the entire session, and performs a T-Test of the computed analysis between the two sessions. Outputs an .html report and .mat file with results.

Input

This pipeline expects two files, which can be specified using a path with wildcards in the input_path parameter.

This path is relative to your Neuroscale account storage bucket. It should either point to a folder containing the two files to be processed, or resolve to two files only. Use curly braces {} to act as wild cards and identify metadata that is unique to each file and which designate the factor on which the t-test is to be performed.

Examples:

\studies\Study1\s1_{Date}_{Session}.xdf will find all files matching \studies\Study\s1_*_*.xdf, and, for each file store the content in the first * as the Date metadata, and the second * as the Session metadata (example: this would find two files called s1_10-23-19_pre.xdf and s1_11-15-19_post.xdf for a pre and post session of the same subject).

\studies\Study1\{Subject}_10-10-19_{Session}.xdf will find all files matching \studies\Study\*_10-10-19_*.xdf, and, for each file store the content in the first * as the Subject metadata, and the second * as the Session metadata (example: this would find two files called s1_10-10-19_task.xdf and s2_10-10-19_task.xdf for two subjects performing the same task). You could then specify the factor as Subject for a t-test between the two.

It's important that only two files should match this input path.

Other key parameters

factor

The factor used for the t-test. This must match one of the factors extracted from the input path metadata (specified with {} in the input path). Example: Session will use the metadata captured by {Session} in the input path to determine the factor levels.

factor_levels

The two levels of the factor being tested. These are the two possible values for the factor you specified above. These must be present in the metadata of the files you import. Important: The order in which these are specified is the order in which the t-test will be performed. So if you want to test 'post' vs 'pre' where positive values indicate that 'post' is greater than 'pre', then you should specify: 'post', 'pre'.

trim_markers

A list of 2 markers to which the data will be trimmed. These markers must exist in the data be unique Example: 'begin-task', 'end-task' will only process/analyze the data between those two markers. Note that preprocessing is done on the entire file.

trim_seconds

Similar to trimmarkers, this will trim the data to given time points in the file, _relative to the beginning of the file. Example: 5, 50 would trim the data down to 45 seconds starting 5 seconds into the recording.

bands_measure

The measure for computed power bands which are computed and displayed in the report. This can be one of three possibilities: relativePSD, dB, PSD. (PSD = Power Spectral Density); dB is PSD converted to decibels.

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.