# compute\_source\_psd

**URL:** <https://mne.discourse.group/t/compute-source-psd/1150>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [January 18, 2017, 8:35pm UTC](https://mne.discourse.group/t/compute-source-psd/1150 "2017-01-18T20:35:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 18, 2017, 8:35pm UTC](https://mne.discourse.group/t/compute-source-psd/1150/1 "2017-01-18T20:35:24Z")

</div>

Dear MNE users,

I'm trying to use compute\_source\_psd but I got the following error

inverse\_operator = make\_inverse\_operator(raw.info, fwd, noise\_cov,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loose=None, depth=None,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fixed=False)

stc = compute\_source\_psd(raw, inverse\_operator, lambda2=lambda2,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;method=inv\_method, fmin=8, fmax=12,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pick\_ori=None, n\_fft=2048)

ValueError: Number of vertices (8190) and stc.shape[0] (24570) must match

what is wrong?  
thks!  
best  
Annalisa

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 19, 2017, 8:56am UTC](https://mne.discourse.group/t/compute-source-psd/1150/2 "2017-01-19T08:56:38Z")

</div>

hi Annalisa,

please open an issue on github with a code snippet to replicate.

thanks for the bug report

Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 19, 2017, 5:07pm UTC](https://mne.discourse.group/t/compute-source-psd/1150/3 "2017-01-19T17:07:10Z")

</div>

Hi Alex,

ok!

I used the data sample and I got another error message  
I'll open an issue with the code.

When you have time could u check the email  
about the coregistration gui?

thanks a lot!

Annalisa

Alexandre Gramfort \<alexandre.gramfort at [telecom-paristech.fr](http://telecom-paristech.fr)\> ha scritto:
