# issue when computing PSDs with eLORETA

**URL:** <https://mne.discourse.group/t/issue-when-computing-psds-with-eloreta/2126>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [March 31, 2020, 11:01am UTC](https://mne.discourse.group/t/issue-when-computing-psds-with-eloreta/2126 "2020-03-31T11:01:48Z")\
**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:** [March 31, 2020, 11:01am UTC](https://mne.discourse.group/t/issue-when-computing-psds-with-eloreta/2126/1 "2020-03-31T11:01:48Z")

</div>

External Email - Use Caution

Dear MNE community,

When trying to compute psd over epochs (with mne.minimum\_norm.compute\_source\_psd\_epochs) using eLORETA method, I have the following error :

psd \*= noise\_norm \*\* 2  
TypeError: unsupported operand type(s) for \*\* or pow(): 'NoneType' and 'int'

Coming from that line:

[https://github.com/mne-tools/mne-python/blob/361fa5fde83c192f705b9a0dd792858237c4b0b1/mne/minimum\_norm/time\_frequency.py#L676](https://github.com/mne-tools/mne-python/blob/361fa5fde83c192f705b9a0dd792858237c4b0b1/mne/minimum_norm/time_frequency.py#L676)

I believe this is because noise\_norm is set to None for MNE and eLORETA methods in:  
[https://github.com/mne-tools/mne-python/blob/1639ab47dd41a73e9e95962e766c80c102cc70f1/mne/minimum\_norm/inverse.py#L673](https://github.com/mne-tools/mne-python/blob/1639ab47dd41a73e9e95962e766c80c102cc70f1/mne/minimum_norm/inverse.py#L673)  
Does anyone has the same issue?  
Thanks in advance.  
Fleur  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200331/b2e0d38d/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200331/b2e0d38d/attachment.html)

---

<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:** [March 31, 2020, 11:52am UTC](https://mne.discourse.group/t/issue-when-computing-psds-with-eloreta/2126/2 "2020-03-31T11:52:36Z")

</div>

External Email - Use Caution

Hi Fleur,

this is likely to be a bug.

can you open an issue on github and ideally provide a code snippet  
to replicate the pb using sample data?

A

---

<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:** [March 31, 2020, 1:26pm UTC](https://mne.discourse.group/t/issue-when-computing-psds-with-eloreta/2126/3 "2020-03-31T13:26:52Z")

</div>

External Email - Use Caution

Hello,

Here is the issue:

[https://github.com/mne-tools/mne-python/issues/7540](https://github.com/mne-tools/mne-python/issues/7540)

[[https://avatars2.githubusercontent.com/u/583875?s=400&v=4](https://avatars2.githubusercontent.com/u/583875?s=400&v=4)]\<[https://github.com/mne-tools/mne-python/issues/7540](https://github.com/mne-tools/mne-python/issues/7540)\>

Error when computing PSDs with eLORETA ? Issue #7540 ? mne-tools/mne-python ? GitHub\<[https://github.com/mne-tools/mne-python/issues/7540](https://github.com/mne-tools/mne-python/issues/7540)\>  
[github.com](http://github.com)  
Describe the bug When trying to compute psd over epochs using eLORETA method, the noise\_norm matrix used to compute the psd is set to None, hence generating an error. Steps to reproduce import matplotlib.pyplot as plt import mne from mne...

Fleur
