[Mne_analysis] Visualizing power spectrum density of sources on the brain

Gladia Hotan gladiach at gmail.com
Tue Jul 5 16:29:50 EDT 2016
Search archives:

Hi,

I fixed the error by using:

stc._data = stc.data[:,0:1]  # First column of sources, instead of
stc.data[:,0] which gives wrong dimensions.

stc.times = stc.times[0:1]  # Extract the first frequency, preserving the
array format (instead of stc.times[0], which is a single number).
# (Multiply this by 1000 to get frequency in Hz because compute_source_psd
converts time into milliseconds)

Now mne.viz.plot_source_estimates(stc,...) produces a plot on the brain at
a single frequency.

Could anyone explain why MNE should be used instead of dSPM to get the
power plots? The tutorial on the MNE website says to use dSPM as the solver.

Thanks and Best,
Gladia

On Fri, Jul 1, 2016 at 10:10 AM, Gladia Hotan <gladiach at gmail.com> wrote:

> Hi Denis,
>
> I tried replacing stc.data and stc.times as such:
>
> stc._data = stc.data[0]  # Just look at the first frequency
> stc.times = stc.times[0]
>
> But trying to plot this gives 'ValueError: dimension mismatch'. Could you
> explain a bit more about how I should hack the stc object? Also, how do I
> figure out how much to scale the data by?
>
> Thank you and Best Regards,
> Gladia
>
> On Thu, Jun 30, 2016 at 4:55 PM, Denis-Alexander Engemann <
> denis.engemann at gmail.com> wrote:
>
>> I can answer in greater detail later, but 1) you need to "hack" the stc
>> object and figure out the right scale after putting the frequenies in
>> .times and accordingly scale ; by default our data containers assume time
>> domain data 2) if you use dSPM as method it is a pseudo F-statistic, for
>> interpretable power plots you should use MNE as method in the inverse
>> solver
>>
>> I hope this helps a bit,
>>
>> Denis
>> On Thu, 30 Jun 2016 at 22:49, Gladia Hotan <gladiach at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have a couple of questions about the psd of sources:
>>>
>>> 1) I used
>>>
>>> stc = mne.minimum_norm.compute_source_psd
>>>
>>> to get an stc file containing the psd of the sources. It seems like in this stc file,
>>> frequency has replaced time, but is still called 'time':
>>>
>>> <SourceEstimate  |  ... tmin : 0.0 (ms), tmax : 55.0 (ms), tstep : 0.25 (ms) ...>
>>>
>>> (I set the function to compute from 0 to 55 Hz; the time duration of the data is
>>> actually a lot longer). I can use stc.plot or mne.plot_source_estimates to visualize this, but it treats
>>> the frequencies like times. How can I plot the psd at a particular frequency on the brain?
>>>
>>> 2) What are the units of the psd of the sources? According to the tutorial <http://martinos.org/mne/stable/auto_examples/time_frequency/plot_source_power_spectrum.html#sphx-glr-auto-examples-time-frequency-plot-source-power-spectrum-py> the psd is in dB,
>>> but what is the reference quantity being used when converting to dB? (Ie. what is Pref in P_db = 10*log10(P/Pref)?)
>>> Am I right that the source amplitudes are in units of ampere-metres?
>>>
>>> Thanks and Best,
>>> Gladia
>>>
>>> _______________________________________________
>>> Mne_analysis mailing list
>>> Mne_analysis at nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>
>>>
>>> The information in this e-mail is intended only for the person to whom
>>> it is
>>> addressed. If you believe this e-mail was sent to you in error and the
>>> e-mail
>>> contains patient information, please contact the Partners Compliance
>>> HelpLine at
>>> http://www.partners.org/complianceline . If the e-mail was sent to you
>>> in error
>>> but does not contain patient information, please contact the sender and
>>> properly
>>> dispose of the e-mail.
>>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160705/803791b3/attachment.html 


More information about the Mne_analysis mailing list