stc=apply_inverse set_eeg_reference error

External Email - Use Caution

Dear experts:
I don?t really know how to get out of this problem.

stc = mne.minimum_norm.apply_inverse(evoked, inverse_operator,lambda2=lambda2,method='MNE')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<decorator-gen-302>", line 21, in apply_inverse
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 878, in apply_inverse
    method_params, return_residual, use_cps)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 885, in _apply_inverse
    _check_reference(evoked, inverse_operator['info']['ch_names'])
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 769, in _check_reference
    raise ValueError('EEG average reference is mandatory for inverse '
ValueError: EEG average reference is mandatory for inverse modeling, use set_eeg_reference method.

I have tried egg reference method and it works bu then I go back to stc? and it doesn?t work.

Sincerely,
Andrade.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200418/4d485338/attachment.html

External Email - Use Caution

Hi,

did you add the reference with projection=True parameter?

Alex

External Email - Use Caution

nope

projection is set to False

?

        External Email - Use Caution

Hi,

did you add the reference with projection=True parameter?

Alex

        External Email - Use Caution

Dear experts:
I don?t really know how to get out of this problem.

stc = mne.minimum_norm.apply_inverse(evoked, inverse_operator,lambda2=lambda2,method='MNE')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<decorator-gen-302>", line 21, in apply_inverse
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 878, in apply_inverse
    method_params, return_residual, use_cps)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 885, in _apply_inverse
    _check_reference(evoked, inverse_operator['info']['ch_names'])
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/minimum_norm/inverse.py", line 769, in _check_reference
    raise ValueError('EEG average reference is mandatory for inverse '
ValueError: EEG average reference is mandatory for inverse modeling, use set_eeg_reference method.

I have tried egg reference method and it works bu then I go back to stc? and it doesn?t work.

Sincerely,
Andrade.