compute_source_psd_epochs 'noisenorm' error

Hi all,

   When running compute_psd_epochs I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/autofs/space/karima_001/users/alex/software/anaconda2/lib/python2.7/site-packages/mne/minimum_norm/time_frequency.py", line 536, in _compute_source_psd_epochs
    prepared=prepared, method_params=method_params, verbose=verbose)
  File "/autofs/space/karima_001/users/alex/software/anaconda2/lib/python2.7/site-packages/mne/minimum_norm/time_frequency.py", line 46, in _prepare_source_params
    K, noise_norm, vertno, _ = _assemble_kernel(inv, label, method, pick_ori)
  File "<string>", line 2, in _assemble_kernel
  File "/autofs/space/karima_001/users/alex/software/anaconda2/lib/python2.7/site-packages/mne/utils.py", line 729, in verbose
    return function(*args, **kwargs)
  File "/autofs/space/karima_001/users/alex/software/anaconda2/lib/python2.7/site-packages/mne/minimum_norm/inverse.py", line 679, in _assemble_kernel
    noise_norm = inv['noisenorm'][:, None]
KeyError: 'noisenorm'

My inverse worked to generate the stc so I'm not sure what is going on. Any help would be appreciated.

Thanks,

Alex

Translational NeuroEngineering Laboratory
Division of Neurotherapeutics, Department of Psychiatry
Massachusetts General Hospital, Martinos Center
149 13th St Charlestown #2301, Boston, MA 02129
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180918/16a68fce/attachment.html

External Email - Use Caution

HI Alex,

can you check if this error is still present with current master branch?

do you only see it when using "MNE" method?

Alex

Hi Alex,

   I just pulled the most recent development version of MNE and the error is still occurring. I was originally using python 2.7 but took this impetus to move to python 3.6.5. The MNE version is listed at 0.16.2. Neither python version or the latest pull worked unfortunately, and I am still getting the same error.

Thanks,

Alex

Translational NeuroEngineering Laboratory
Division of Neurotherapeutics, Department of Psychiatry
Massachusetts General Hospital, Martinos Center
149 13th St Charlestown #2301, Boston, MA 02129

External Email - Use Caution

ok so please open an issue here http://github.com/mne-tools/mne-python/issues
and provide a full script to replicate the pb using the sample dataset.

thanks
Alex

Before I do that, I saw that the inverse_operator['noisenorm'] property was just an empty list in the example audio inverse. Do you or does anyone know what effect setting that property to an empty list would have? If so, I could just do that.

Alex

Translational NeuroEngineering Laboratory
Division of Neurotherapeutics, Department of Psychiatry
Massachusetts General Hospital, Martinos Center
149 13th St Charlestown #2301, Boston, MA 02129

Hi Alex,

Please feel free to pass by my office, if you want to debug it together.

Thanks

Sheraz

I figured it out... it was the prepared = True keyword argument. I hadn't prepared the inverse. It's always the simplest things... thanks for all the help.

Alex

Translational NeuroEngineering Laboratory
Division of Neurotherapeutics, Department of Psychiatry
Massachusetts General Hospital, Martinos Center
149 13th St Charlestown #2301, Boston, MA 02129

External Email - Use Caution

can we avoid making this mistake next time? we should detect it and
provide a good mesage
so people don't fall into the trap.

can you send us a PR for this?

thanks

Alex