dip.gof

External Email - Use Caution

Dear experts:

I am trying to run mne.fit_dipole

but I come across this error

359 time points fitted
Traceback (most recent call last):
  File "Rene.py", line 44, in <module>
    best_idx = np.argmax(dip.gof)
AttributeError: 'tuple' object has no attribute 'gof'

I assume there has to be some problem with Dipole class.

Best,
Andrade.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200622/6eda07aa/attachment.html

External Email - Use Caution

The output of `fit_dipole` is a tuple with two elements, the dipole and the
residual (see docs here
<https://mne.tools/dev/generated/mne.fit_dipole.html#mne.fit_dipole>).
Maybe you need to do `dip, ev = fit_dipole(...)` or `dip =
fit_dipole(...)[0]`?

Eric

External Email - Use Caution

Although Eric has already guessed the probable reason for your error, I will take this opportunity to remind you (and all readers of this list) that in general we want to see more of your code to be able to help you debug. In particular, in this case we would want *at least* to see the line(s) where you define the variable `dip`. Better yet would be to post a pared-down version of the whole script (e.g., on gist.github.com) and include the link to it in your request for help.

Ideally the pared-down script should be a [minimal, complete, and verifiable example](https://stackoverflow.com/help/mcve) that demonstrates the problem you are experiencing. If at all possible, your example should use [MNE-Python's "sample" dataset](https://mne.tools/dev/overview/datasets_index.html#sample) or one of the other built-in datasets so that we can quickly and easily replicate your error on our own computers.

-- dan
Daniel McCloy
https://dan.mccloy.info
Research Scientist
Institute for Learning and Brain Sciences
University of Washington

??? Original Message ???