[Eeglablist] [External] Re: Frequency-time spectrogram deconstruction

Fotiadis, Panagiotis Panagiotis.Fotiadis at pennmedicine.upenn.edu
Wed Jan 30 22:49:22 PST 2019


Hi Makoto,

That sounds good, thank you, I’ll go ahead and implement this! I had an additional question:

If I have a certain event evoked epoch (i.e., after a stimulus is applied) within my continuous data for each one of my subjects, and I want to investigate what the spatial pattern of activation is (i.e., which channels/scalps get activated first, second etc), is there a way that you recommend to quantify the observed gradient of activation? Using your input on point 2 below I can visualize the scalp activation gradient as an animation, but I was wondering whether there was a way to actually quantify this.

Thank you again for all your help and time!

Best,
Panos

From: Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
Reply-To: "mmiyakoshi at ucsd.edu" <mmiyakoshi at ucsd.edu>
Date: Thursday, January 10, 2019 at 6:59 PM
To: "Fotiadis, Panagiotis" <Panagiotis.Fotiadis at pennmedicine.upenn.edu>
Cc: "eeglablist at sccn.ucsd.edu" <eeglablist at sccn.ucsd.edu>
Subject: Re: [External] Re: [Eeglablist] Frequency-time spectrogram deconstruction

Dear Panos,

> 1) In addition to calculating the average absolute power (as your script nicely shows), I was also interested in calculating the average absolute (and relative) power at binned time intervals (e.g. avg power between 0-1sec, avg power between 1-2sec, etc) within the dataset. I tried to use the "spectra" output from spectopo but from what I gather it comes up with [(sampling rate)/2 + 1] points rather that one power-spectral point per timepoint. How would you recommend that I proceed?

You can repeatedly apply EEGLAB spectopo() function to perform hand-made short-term Fourier transform (STFT), but alternatively you might want to use either EEGLAB newtimef() or Matlab spectrogram() function (the latter may require some additional Toolbox). The output will be frequency x time matrix. The interval of time bins needs to be calcualted. Basically, {(length of data) - (sliding window length)}/(number of steps) gives you the interval (step size). Adjust the (number of steps) so that you can obtain the desired interval.

> 2) Is there a way to display how do topographic maps (scalp heat maps) change with time (I'm able to see how they change with different frequencies but I was interested in seeing how they also change with time)? Would the function timtopo be the best way to do that?

See this wiki page.
https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts#Creating_a_scalp_map_animation

> 3) A more general question:  If I write a matlab script that I would like to apply on a bunch of datasets (which in my case are just epochs of different lengths that I have extracted from my original dataset), should I put all said datasets  (which I have already pre-processed and applied ICA on) in a STUDY set and then apply the script there, or should I just write a for loop in matlab and apply the script in each individual dataset? In other words, does the STUDY set offer an advantage in this case?  (I apologize for the potential triviality of this one!)

If you are a beginner, it is always a good idea to make things as simple as possible. I recommend you organize your own code to loop the single-subject process for all the subjects. After all, that's the only to learn the process!

Makoto

On Wed, Jan 9, 2019 at 11:47 AM Fotiadis, Panagiotis <Panagiotis.Fotiadis at pennmedicine.upenn.edu<mailto:Panagiotis.Fotiadis at pennmedicine.upenn.edu>> wrote:

Hi Makoto,



Thank you for the really great advice! The two links you provided are extremely helpful.



I had a few follow-up questions:

1) In addition to calculating the average absolute power (as your script nicely shows), I was also interested in calculating the average absolute (and relative) power at binned time intervals (e.g. avg power between 0-1sec, avg power between 1-2sec, etc) within the dataset. I tried to use the "spectra" output from spectopo but from what I gather it comes up with [(sampling rate)/2 + 1] points rather that one power-spectral point per timepoint. How would you recommend that I proceed?



2) Is there a way to display how do topographic maps (scalp heat maps) change with time (I'm able to see how they change with different frequencies but I was interested in seeing how they also change with time)? Would the function timtopo be the best way to do that?



3) A more general question:  If I write a matlab script that I would like to apply on a bunch of datasets (which in my case are just epochs of different lengths that I have extracted from my original dataset), should I put all said datasets  (which I have already pre-processed and applied ICA on) in a STUDY set and then apply the script there, or should I just write a for loop in matlab and apply the script in each individual dataset? In other words, does the STUDY set offer an advantage in this case?  (I apologize for the potential triviality of this one!)



Thank you again in advance for your time and help!



Best,

Panos



Panagiotis Fotiadis

PhD Student | Neuroscience Graduate Group

Perelman School of Medicine, University of Pennsylvania

________________________________
From: Makoto Miyakoshi <mmiyakoshi at ucsd.edu<mailto:mmiyakoshi at ucsd.edu>>
Sent: Monday, January 7, 2019 2:48:37 PM
To: Fotiadis, Panagiotis
Cc: eeglablist at sccn.ucsd.edu<mailto:eeglablist at sccn.ucsd.edu>
Subject: [External] Re: [Eeglablist] Frequency-time spectrogram deconstruction

Dear Panos,

Welcome to the time-frequency world.

> Would I just need to bandpass filter my post-processed EEG signal to each frequency range of interest (i.e., alpha: 8-12Hz etc) and then plot the remaining EEG signal over time, or is there another way to do this?

That's one way to go. Nothing is wrong with that!

More convenient and established way to go is to perform time-frequency transform using short-term Fourier transform or Wavelet transform. Google EEGLAB time-frequency and you'll find many of our past workshop materials. For example, see Slide 21 of this file
https://sccn.ucsd.edu/mediawiki/images/a/a6/C2_A3_Time-frequencyDecAndAdvancedICAPracticum_updateJan2017.pdf

You can also obtain bin-mean values from power spectral density. See below.
https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#How_to_extract_EEG_power_of_frequency_bands

Makoto

On Mon, Jan 7, 2019 at 1:34 AM Fotiadis, Panagiotis <Panagiotis.Fotiadis at pennmedicine.upenn.edu<mailto:Panagiotis.Fotiadis at pennmedicine.upenn.edu>> wrote:

Hello,



I am fairly new to EEGLab and I had a question concerning the deconstruction of my EEG signal into its alpha/beta/theta/delta sub-components:



After pre-processing some subjects with EEG data from 128 channels and performing ICA (using runica), I used eeglab and chronux to plot the power/frequency and frequency/time spectrograms of several epochs of interest.



Is there a way to extract the alpha/beta/theta/delta frequencies of those epochs and quantify when they occur in time? I can visualize when each type of neuronal oscillation occurs by looking at the overall frequency/time spectrogram, but I was wondering whether there was a more robust way to actually plot each type of oscillation separately and/or quantify when it occurs.



Would I just need to bandpass filter my post-processed EEG signal to each frequency range of interest (i.e., alpha: 8-12Hz etc) and then plot the remaining EEG signal over time, or is there another way to do this?



Thank you in advance!



Best,

Panos
_______________________________________________
Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu<mailto:eeglablist-unsubscribe at sccn.ucsd.edu>
For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu<mailto:eeglablist-request at sccn.ucsd.edu>


--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego


--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20190131/dc6f4f13/attachment-0001.html>


More information about the eeglablist mailing list