<div dir="ltr"><div>Hi Denis,<br><br></div>Thanks for your reply!<br><br>I noted that in the compute_source_psd code, the output is already scaled to dB (psd = 10*np.log10(psd) is taken in line 486). Is it still necessary to take 10*log10 of the output?<div><br></div><div>I tried detrending the data prior to computing the inverse solution and noise covariance matrix, but I get a similar result in which most of the power is localized in the white matter. An example of the average I get over many epochs is at this link: <a href="https://www.dropbox.com/s/vs7jjd8u2szjrbo/Screen%20Shot%202016-07-14%20at%202.19.20%20PM.png?dl=0">https://www.dropbox.com/s/vs7jjd8u2szjrbo/Screen%20Shot%202016-07-14%20at%202.19.20%20PM.png?dl=0</a> <br><br>I tried plotting spectra (power vs frequency) of the sources and the spectra look reasonable; it&#39;s just the spatial distribution that&#39;s strange.<br><br></div><div>This is roughly how I&#39;m extracting power at a certain frequency:<br></div><div><br></div><div># Compute psd of sources:<br></div><div>stc_psd = mne.minimum_norm.comptue_source_psd(...)<br><br></div><div># Extract the frequency band of interest:<br></div><div>data = stc_psd.data[:,1:5]  # Shape: numsources*4<br><br># Sum the power in the frequency band of interest:<br></div><div>av_data = np.transpose(np.array([np.sum(data,1)]))  # Shape: numsources*1  <br><br></div><div># Make a copy of the stc object and overwrite its data:<br></div><div>stc_psd1 = stc_psd.copy()<br></div><div>stc_psd1.times = stc_psd_slow.times[0:1]   # Doesn&#39;t matter what this number is; just get the dimensions right<br></div><div>stc_psd1._data = av_data<br><br></div><div># Visualize:<br></div><div>mne.viz.plot_source_estimates(stc_psd1,...)<br><br></div><div>Is there any other troubleshooting method I can try?<br></div><div><br></div><div>Thanks and Best,<br></div><div>Gladia<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 12:22 PM, Denis-Alexander Engemann <span dir="ltr">&lt;<a href="mailto:denis.engemann@gmail.com" target="_blank">denis.engemann@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry Gladia,<div><br></div><div>I was a bit unclear I fear. I was referring to the fact, that if you want to see things in dB and want to look at the power spectrum in one ROI or vertex the same way you want to look at it in the sensor space, you need to use the MNE option. You can then intuitively take the decadic logarithm and scale to dB.<div><div>Then for the surface plotting it is a bit tricky with regard to color maps. Both dSPM and MNE can be intuitively used but the entire MNE viz system sort of expects time domain data as you may have noticed, where data are dont&#39; have any tend.<br></div></div><div>With frequency domain data this is not the case, you have local peaks but a global 1/f trend which will mess up your display. You then either need to detrend the spectrum or choose fmin, fmid, fmax, carefully, essentially setting them at each frequency where you make sure that your stc.times vector is not longer than 1; by default histograms for determining viz values are computed over all time points so the auto option won&#39;t work. Lot&#39;s of manual tuning required unfortunately.</div><div>As to your plots I&#39;m not fully sure I get your message. Intuitively make sure you get the relationship between the time domain and the specteal data right, maybe the time domain localization is driven by a certain band. And as said, colormaps can be difficult and misleading. Plotting historgrams along the way and looking at slices can help understand what you do. </div><span class=""><div><br></div><div>I hope this helps a bit,</div><div>Denis</div><div><br></div></span></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 7, 2016 at 4:04 PM Gladia Hotan &lt;<a href="mailto:gladiach@gmail.com" target="_blank">gladiach@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">Thanks Alex!</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am wondering why when I plot the psd on the brain I get a lot of activity in the corpus callosum and white matter rather than in the grey matter, which is where the sources are localized to. Here is a link to example screenshots of the source distribution vs the psd distribution on the brain, which don&#39;t seem to match: <span style="font-size:small"><a href="https://www.dropbox.com/sh/blstn3xitewbg5t/AACia--q9mF6d0ZjluhXq_TGa?dl=0" target="_blank">https://www.dropbox.com/sh/blstn3xitewbg5t/AACia--q9mF6d0ZjluhXq_TGa?dl=0</a></span></div><div style="font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-size:12.8px"><span style="font-size:12.8px"> How can I check that the source psd is being plotted correctly?</span></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks and Best,</div><div style="font-size:12.8px">Gladia</div></div><div style="font-size:12.8px"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 4:54 PM, Alexandre Gramfort <span dir="ltr">&lt;<a href="mailto:alexandre.gramfort@telecom-paristech.fr" target="_blank">alexandre.gramfort@telecom-paristech.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>&gt; Could anyone explain why MNE should be used instead of dSPM to get the power<br>
&gt; plots? The tutorial on the MNE website says to use dSPM as the solver.<br>
<br>
</span>dSPM is just a normalized/scaled version of MNE (scaling is obtained<br>
form the noise standard deviation derived from the noise cov). So<br>
basically it&#39;s just a scaling factor. If you apply a baseline /<br>
contrast with a log ratio of power then there is no diff between the<br>
2.<br>
<br>
HTH<br>
Alex<br>
<div><div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>