issue when computing PSDs with eLORETA

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

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
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

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

External Email - Use Caution

Hello,

Here is the issue:

https://github.com/mne-tools/mne-python/issues/7540

[https://avatars2.githubusercontent.com/u/583875?s=400&v=4]<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>
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