<div dir="ltr"><div dir="ltr">Dear Panos,<div><br></div><div>> 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.<br></div></div><div><br></div><div>You are using the input (sensor-level values) that generates the scalp maps, so why don't you take them? So that you can perform channel-by-channel power comparison at a given latency.</div><div><br></div><div>Makoto</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 30, 2019 at 10:49 PM Fotiadis, Panagiotis <<a href="mailto:Panagiotis.Fotiadis@pennmedicine.upenn.edu">Panagiotis.Fotiadis@pennmedicine.upenn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_47080229016445263WordSection1">
<p class="MsoNormal">Hi Makoto,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">That sounds good, thank you, I’ll go ahead and implement this! I had an additional question:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you again for all your help and time!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best,<u></u><u></u></p>
<p class="MsoNormal">Panos <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>><br>
<b>Reply-To: </b>"<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>" <<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>><br>
<b>Date: </b>Thursday, January 10, 2019 at 6:59 PM<br>
<b>To: </b>"Fotiadis, Panagiotis" <<a href="mailto:Panagiotis.Fotiadis@pennmedicine.upenn.edu" target="_blank">Panagiotis.Fotiadis@pennmedicine.upenn.edu</a>><br>
<b>Cc: </b>"<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
<b>Subject: </b>Re: [External] Re: [Eeglablist] Frequency-time spectrogram deconstruction<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Dear Panos, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">> 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?  <br>
<br>
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. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">> 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?<br>
<br>
See this wiki page.<br>
<a href="https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts#Creating_a_scalp_map_animation" target="_blank">https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts#Creating_a_scalp_map_animation</a><br>
<br>
> 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!)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Makoto<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Jan 9, 2019 at 11:47 AM Fotiadis, Panagiotis <<a href="mailto:Panagiotis.Fotiadis@pennmedicine.upenn.edu" target="_blank">Panagiotis.Fotiadis@pennmedicine.upenn.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308divtagdefaultwrapper">
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308divtagdefaultwrapper">
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Hi Makoto,<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Thank you for the really great advice! The two links you provided are extremely helpful.<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">I had a few follow-up questions:<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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?  <u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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?<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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!)<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Thank you again in advance for your time and help!<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Best,<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Panos<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308Signature">
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308divtagdefaultwrapper">
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Panagiotis Fotiadis<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">PhD Student | Neuroscience Graduate Group<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Perelman School of Medicine, University of Pennsylvania<u></u><u></u></span></p>
</div>
</div>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12pt;color:black">
<hr size="0" width="82%" align="center">
</span></div>
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>><br>
<b>Sent:</b> Monday, January 7, 2019 2:48:37 PM<br>
<b>To:</b> Fotiadis, Panagiotis<br>
<b>Cc:</b> <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
<b>Subject:</b> [External] Re: [Eeglablist] Frequency-time spectrogram deconstruction</span><span style="font-size:12pt;color:black">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> <u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Dear Panos,<br>
<br>
Welcome to the time-frequency world.<br>
<br>
> 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?<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">That's one way to go. Nothing is wrong with that!<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">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<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><a href="https://sccn.ucsd.edu/mediawiki/images/a/a6/C2_A3_Time-frequencyDecAndAdvancedICAPracticum_updateJan2017.pdf" target="_blank">https://sccn.ucsd.edu/mediawiki/images/a/a6/C2_A3_Time-frequencyDecAndAdvancedICAPracticum_updateJan2017.pdf</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">You can also obtain bin-mean values from power spectral density. See below. <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><a href="https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#How_to_extract_EEG_power_of_frequency_bands" target="_blank">https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#How_to_extract_EEG_power_of_frequency_bands</a><u></u><u></u></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Makoto<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">On Mon, Jan 7, 2019 at 1:34 AM Fotiadis, Panagiotis <<a href="mailto:Panagiotis.Fotiadis@pennmedicine.upenn.edu" target="_blank">Panagiotis.Fotiadis@pennmedicine.upenn.edu</a>> wrote:<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div id="gmail-m_47080229016445263gmail-m_-6369755040534945308x_gmail-m_-5825005070605991825divtagdefaultwrapper">
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Hello,<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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:<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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. <u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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.<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">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?<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Thank you in advance!<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Best,<u></u><u></u></span></p>
<p style="margin:0in 0in 0.0001pt"><span style="font-size:12pt;color:black">Panos<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">
eeglablist-request@sccn.ucsd.edu</a><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><br clear="all">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">-- <u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Makoto Miyakoshi<br>
Swartz Center for Computational Neuroscience<br>
Institute for Neural Computation, University of California San Diego<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Makoto Miyakoshi<br>
Swartz Center for Computational Neuroscience<br>
Institute for Neural Computation, University of California San Diego<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div></div>