[Mne_analysis] dip.gof {Disarmed}

Dan McCloy dan at mccloy.info
Mon Jun 22 17:39:20 EDT 2020
Search archives:

        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 ‐‐‐‐‐‐‐
On Monday, June 22, 2020 2:33 PM, Eric Larson <larson.eric.d at gmail.com> wrote:

> 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
>
> On Mon, Jun 22, 2020 at 5:24 PM Andrade Rey René <rene.andrade at edu.uah.es> wrote:
>
>> 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.
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200622/b0774e5d/attachment-0001.html 


More information about the Mne_analysis mailing list