Power spectrum density (Welch)

Hi,
I am trying to calculate power spectrum density (PSD). I epoched continuous raw data (15 minutes) into epochs (epoch length: 4 seconds (-1sec zero 3sec)), run independent component analysis to remove artifacts and got epoched and cleaned data. Then calculated PSD.
My question:

  • Is it OK to calculate PSD on my already epoched EEG data (-1sec to 3sec) or PSD should be calculated on continuous EEG data?
  • If it is OK, should I include time from -1sec to zero (baseline), so from -1sec to 3sec or should use time from zero to 3sec?
    Thanks

ICA should be executed on continuous recordings, not epoched data.
The spectrum should also be evaluated on the continuous file. An alternative is to compute the FFT and average the power of the FFT across all the trials: this is what the the Welch algorithm is, minus the overlap of 50% between the windows.

For processing resting/steady state recordings (or any analysis that is not based on events), follow the guidelines in this tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/RestingOmega

For epoch data, simply follow the instructions of the introduction tutorials (if you have not read them yet, time to do it now - from the beginning and in the correct order):
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsFilter

1 Like

Thanks Francois.
I will read the tutorials.

Hello Francois. What about doing Morlet Transform on continuous data (15 min) or it should be better done on already epoched EEG data?
But because the data is continuous, standardization and calculation of dB values relative to baseline would be difficult if it is continuous data, all is resting recording. That is why is it OK to do Morlet on continuous data (15 min) and to present just absolute values without standardization?
or when uploading long continuous data (already cleaned) into Brainstorm can I use split into 4 sec windows and then do Morlet and standardize it to relative power? But I did not get it is relative to what?
Thanks

What about doing Morlet Transform on continuous data (15 min) ?

It all depends what you are expecting from this computation.
If it makes sense to compute time-frequency decompositions of long data segments and you can make it work on your computer, then there is no problem.

You have to be aware that this may create gigantic files or crash your computation. For example:
15min x 60s x 128 channels x 60 frequencies x 1000 Hz ~= 50 Gb

Example of TF on 10s of continuous recordings:
https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy#Continuous_recordings

But I did not get it is relative to what?

Relative to the total power?
https://neuroimage.usc.edu/brainstorm/Tutorials/RestingOmega#Power_maps

1 Like

Thanks Francois, now it is clear to me. Do the following steps look correct?

  • I import the continuous (15 minutes long) and already cleaned data (filtered, except notch filter; artifacts removed using ICA: did run ICA on continuous data) into Brainstorm. Calculate PSD (Welch), 4 sec window, overlap 50%, Matlab FFT default. If there is a spike at around 60 Hz, I will apply notch filter. I avoid epoching data at any step.

  • To do Morlet transform, first segment the same continuous data above into 10 sec pieces.

You do not need to "import" your data to compute the PSD, use the menu "Review raw file" instead, as in the tutorials:
https://neuroimage.usc.edu/brainstorm/Tutorials/ChannelFile#Review_vs_Import

Time-frequency decomposition of continuous recordings is complicated to use: what are your hypotheses and objective with this computation?

Thanks regarding import point.

In a patient population, I am recording resting EEG (15 min), doing intervention (brain computer interface for a 6 weeks), then recording resting EEG again (15 min). I would like to see if there is a change in PSD and cortical oscillations in resting EEG after intervention compared to that before the intervention.

Then I'm not sure how time-frequency can help you.
You need to find one simple metric (one scalar value per subject) that you can compare before and after the BCI training: power in a frequency band, or interactions between brain regions. Anything that keeps the time dimension will make your analysis very difficult.

This is a pain study. I plan to have a look at theta and gamma oscillations before and after intervention. These bands are of interest for patients with chronic pain. I would like to have a look at power spectrum.
I am also interested in doing Morlet transform but will have time dimension, may be I can average the transforms across time?.