Size: 6418
Comment:
|
Size: 6207
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
== Initializing and running SPRiNT == SPRiNT is performed on time-series, so we will run FOOOF over the PSD files we previously produced. |
== Preparing the data for SPRiNT == SPRiNT is performed on time-series, so we will first prepare some data from our notch-filtered dataset. |
Line 16: | Line 16: |
* Clear the list of files in the Process1 tab. * Select the PSDs from the three datasets we have linked to our protocol and load them into Process1. You can select the two "PSD: 179/4000ms Power (MEG)" files and the single "PSD: 59/4000ms Power (MEG)". If you do not have these PSDs, refer to [[https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsFilter|tutorial 10]]. * Click on [Run] to open the pipeline editor window. * Select the process "'''Frequency > FOOOF: Fitting oscillations and 1/f'''". <<BR>><<BR>> {{attachment:psd_select.gif||height="324",width="170"}} {{attachment:FOOOF_options.png||height="324",width="220"}} |
* Right-click the "Link to raw file" in the folder "S01_AEF_20131218_01_600Hz_notch" * Select Import to database. In this tutorial, we will use the data from 60-120 s.<<BR>> If you haven't already, now is a good time to remove DC offset. This will not affect our analyses, but it makes it easier to visualize the time-series. * Click on [Import] to import the dataset into the database. |
Line 22: | Line 21: |
== Preparing the data for SPRiNT == |
Spectral Parameterization Resolved iN Time (SPRiNT)
Author: Luc Wilson
This tutorial introduces the features developed in Brainstorm to compute and view SPRiNT models, or time-resolved parameterized spectra.
Introduction
The Spectral Parameterization Resolved iN Time (SPRiNT) algorithm is designed to identify and model spectral features of the neural activity across time. Beginning with the time-series, it performs a short-time Fourier transform (STFT) and averages windows locally in time to generate local-mean power spectra, before decomposing these spectra into aperiodic and periodic components using specparam. The present tutorial will demonstrate the algorithm’s functionality within the Brainstorm interface.
This demonstration uses sample data from the introduction dataset, and can be followed by completing all steps of the Brainstorm tutorial up to and including tutorial 10.
Preparing the data for SPRiNT
SPRiNT is performed on time-series, so we will first prepare some data from our notch-filtered dataset.
- Right-click the "Link to raw file" in the folder "S01_AEF_20131218_01_600Hz_notch"
Select Import to database. In this tutorial, we will use the data from 60-120 s.
If you haven't already, now is a good time to remove DC offset. This will not affect our analyses, but it makes it easier to visualize the time-series.- Click on [Import] to import the dataset into the database.
Preparing the data for SPRiNT
Select the following process options:
FOOOF version: Matlab
This option allows you to choose which version of FOOOF you would like to run; either the MATLAB standalone version, or the original Python version. Results and computation times may vary slightly between versions but are roughly the same.Frequency range for analysis: 1.0 - 40.0 Hz [default: 1.0 - 40.0 Hz].
FOOOF is best performed on a subset of the frequencies from the original PSD. In this range, it is important to avoid frequencies which have previously been filtered, as their adjusted powers can alter model results adversely.Ignore power line frequencies: None [default: 60 Hz].
Depending on whether a notch filter was previously used for one's regional power line frequency (and harmonics), FOOOF may either be attempting to fit increases in power attributable to power lines as peaks, or the aperiodic fit may be disrupted by 'negative peaks' of power. To avoid both of these pitfalls, users can choose to ignore frequencies whose power measures have been disrupted by power lines or their filtering (for instance, 60±2Hz, 120±2Hz, 180±2Hz) in the modelling process. This option becomes important when fitting a broader range of frequencies (>40Hz) and should be set in accordance with one's region.Peak model: Gaussian [default: Gaussian].
The original FOOOF algorithm fits spectral peaks using a gaussian distribution; the MATLAB version also allows the algorithm to fit peaks using a Cauchy distribution instead. The final option ("Best of Both") allows for individual channels to be fit using the distribution which minimizes model mean squared error (MSE).Peak width limits: 1.5 - 12.0 Hz [default: 0.5 - 12.0 Hz].
The bounds for a putative peak to be included in the final FOOOF model. Putative peaks outside these bounds are discarded.Maximum number of peaks: 3 [default: 3].
The maximum number of attempts the model will make to identify peaks; it is best to allow for at least the number of observable peaks in the PSD plus one, in the event that the model does not remove a larger peak entirely in the peak-identification process.Minimum peak height : 3.0 dB [default: 3 dB].
The minimum peak height (in log[Power]) necessary for a putative peak to be included in the final FOOOF model. Putative peaks smaller than this threshold will be discarded.Proximity threshold: 2 standard deviations of the (comparatively) largest peak [default: 2].
Occasionally, the algorithm can mistake components of a single peak as two smaller peaks. This option forces the smaller of two peaks which are too close to one-another (i.e. If the center frequency of the smaller peak is within this value of standard deviations of the larger peak’s center frequency), the smaller of the two peaks is discarded. This option also removes peaks within this value of their standard deviation from the edge of the frequency window.Aperiodic mode: Fixed [default: Fixed].
The aperiodic component of the neural power spectrum occasionally presents with a knee, as seen below in log-log space. When selecting this option, you should first consult your data to determine whether it has a knee or not (Note: a knee component is present when the aperiodic features of the spectrum plotted in log-log space are not linear).
Guess weight: Weak [default: None].
By design, peak parameter estimates are close to the actual fit. However, fitting a distribution that does not match the spectrum precisely (i.e. fitting a gaussian distribution to an imperfect gaussian-shaped peak) can occasionally lead to semantically worse-fit models; square error is reduced, but the model does not look as much like the data. Selecting this option allows for additional model error to be placed on parameter values which lie further from initial estimates. “Weak” represents a small penalty, while “Strong” represents a larger penalty (essentially keeping the pre-optimization estimates). When this option is set to “None”, the algorithm reduces square error most similarly to the Python version.Note: Guess weight selections are ignored when Brainstorm detects that the user has the optimization toolbox, as it will use constrained optimization to best-match the Python version. It is recommended that users have the optimization toolbox.