<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Let me be more specific/clear:</p>
<p style="margin-top:0;margin-bottom:0">I'm analyzing data from a patient with an ECOG. I want to compare the power-spectrum of the electrodes and the MEG cortical labels I've created around each electrode.&nbsp;</p>
<p style="margin-top:0;margin-bottom:0">It seems that calculating the time series in the source space of long enough MEG epochs (~10s), split the electrodes file to same length epochs, and use&nbsp;</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>mne.time_frequency.psd_array_multitaper on both of them is the way to go, and also I know that both are in the same units (10*log10 for [dB]).</div>
<div>But I'm still a little bit confused by the different results I'm getting when using&nbsp;<span>mne.minimum_norm.compute_source_psd_epochs instead.</span></div>
<div><span><br>
</span></div>
<div><span>Thanks,</span></div>
<div><span>Noam</span></div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mne_analysis-bounces@nmr.mgh.harvard.edu &lt;mne_analysis-bounces@nmr.mgh.harvard.edu&gt; on behalf of Peled, Noam &lt;NPELED@mgh.harvard.edu&gt;<br>
<b>Sent:</b> Wednesday, August 29, 2018 2:32:39 PM<br>
<b>To:</b> mne_analysis@nmr.mgh.harvard.edu<br>
<b>Subject:</b> [Mne_analysis] Cortical labels power spectrum different approaches</font>
<div>&nbsp;</div>
</div>
<meta content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">Hey all,</p>
<p style="margin-top:0; margin-bottom:0">I'm calculating MEG cortical labels power spectrum (for resting state data) in two different ways. Can you help me understand the differences? The power spectrums are quite different (see attached).&nbsp;<br>
</p>
<p style="margin-top:0; margin-bottom:0"></p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
<br>
</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
1) Go through the source space time-series:</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
</p>
<div><br>
</div>
<div>stcs = mne.minimum_norm.apply_inverse_epochs(epochs, ...)</div>
<div>labels_ts = mne.extract_label_time_course(stcs, labels, ...)</div>
<div>for label_ts:</div>
<div>&nbsp; psds, freqs = mne.time_frequency.psd_array_welch(label_ts, ...)</div>
<div>
<div>&nbsp; psds = 10 * np.log10(psds)</div>
<div><br>
</div>
</div>
<br>
<p></p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
2) Compute the PSD from the epochs:</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
<br>
</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
</p>
<div>for label_ind, label in enumerate(labels):</div>
<div>&nbsp; stcs = mne.minimum_norm.compute_source_psd_epochs(epochs, ...)</div>
<div>&nbsp; for stc in stcs:</div>
<div>&nbsp; &nbsp; psds = np.mean(stc.data, axis=0)</div>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
<br>
</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
<br>
</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
Thanks!</p>
<p style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols; font-size:16px">
Noam</p>
<br>
<p></p>
</div>
</div>
</body>
</html>