mne.minimum_norm.compute_source_psd

External Email - Use Caution

Hi,
I'm using the following example to perform source localisation.
https://martinos.org/mne/stable/auto_examples/datasets/plot_opm_rest_data.html

I'm also attaching the code I'm using.
So, when I run the following command:

stc_psd, sensor_psd = mne.minimum_norm.compute_source_psd(raws['vv'],
inverse_operator, lambda2=lambda2, method='sLORETA', tmin=0.0, tmax=574.0,
n_fft=n_fft, dB=False, return_sensor=True, verbose=True)

where I have defined the time to be considered, but as the output of this
what I'm getting is:
<SourceEstimate | 8064 vertices, subject : Collin, tmin : 0.0 (ms), tmax
: 100000.0 (ms), tstep : 97.65625 (ms), data shape : (8064, 1025)>
(I have resampled the data at 100 Hz and n_fft = 800)

Where tmax is 100 seconds, whereas I have defined it as 574 seconds in the
command above.
I want this function mne.minimum_norm.compute_source_psd, to consider
complete meg file for computing source psd.

External Email - Use Caution

hi,

this function hacks a SourceEstimate object : stc_psd to store PSDs. So
what you read
with time:

<SourceEstimate | 8064 vertices, subject : Collin, tmin : 0.0 (ms), tmax
: 100000.0 (ms), tstep : 97.65625 (ms), data shape : (8064, 1025)>

should be:

<SourceEstimate | 8064 vertices, subject : Collin, fmin : 0.0 (Hz), fmax
: 100000.0 (mHz), fstep : 97.65625 (mHz), data shape : (8064, 1025)>

HTH
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190612/a555d0b6/attachment.html

External Email - Use Caution

Thank You.

External Email - Use Caution

In continuation of the above thread, I unable to understand what does 1025
mean in data shape.
<SourceEstimate | 8064 vertices, subject : Collin, tmin : 0.0 (ms), tmax
: 100000.0 (ms), tstep : 97.65625 (ms),
*data shape : (8064, 1025)>*

External Email - Use Caution

It is the number of time points.

External Email - Use Caution

The total time I have considered is 574 seconds so how it is related to
1025 time points.

External Email - Use Caution

It should be the number of frequencies.
For each source (8064) you have 1025 values of power density, one per frequency . (frequencies ranging from 0 Hz to 100Hz with 97.65625mHz step).
This tutorial<https://www.nmr.mgh.harvard.edu/mne/stable/auto_examples/time_frequency/plot_source_power_spectrum.html#sphx-glr-auto-examples-time-frequency-plot-source-power-spectrum-py> should help you understand how it works ( especially the last plot)

Best,
Victor

External Email - Use Caution

Ah, Victor is right. Sorry Vivek for giving you the wrong advice; I looked
only at the repr of the object, which had a tmin, tmax, and tstep; I didn't
dig through the example that got you there.

External Email - Use Caution

Hi,
Thanks for the information.