[Mne_analysis] Error using morph.apply(stc) in MNE v0.18.2

Alexandre Gramfort alexandre.gramfort at inria.fr
Fri Jun 26 15:50:20 EDT 2020
Search archives:

        External Email - Use Caution        

hi Gladia,

can you try with a more recent version of MNE if the problem persists?

Alex

On Fri, Jun 26, 2020 at 3:54 AM Gladia Hotan <gladiach at gmail.com> wrote:
>
>         External Email - Use Caution
>
> Hi,
>
> I'm using MNE v0.18.2 and there's an error when I try to morph data using morph.apply(stc). In accordance with this document, I did:
>
> morph = mne.compute_source_morph(stc, subject_from=subject,
>                                  subject_to=avgsubject,
>                                  subjects_dir=subjects_dir)
> stc_morphed = morph.apply(stc)
>
>
> compute_source_morph worked, but morph.apply(stc) returned the error:
>
>
> Traceback (most recent call last):
>   File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code
>     exec(code_obj, self.user_global_ns, self.user_ns)
>   File "<ipython-input-68-ae08f53d7c9d>", line 1, in <module>
>     stc_morphed = morph.apply(stc)
>   File "</autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-281>", line 2, in apply
>   File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/utils/_logging.py", line 89, in wrapper
>     return function(*args, **kwargs)
>   File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/morph.py", line 366, in apply
>     out = _apply_morph_data(self, stc)
>   File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/morph.py", line 1205, in _apply_morph_data
>     data = morph_mat * data
>   File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/scipy/sparse/base.py", line 528, in __mul__
>     raise ValueError('could not interpret dimensions')
> ValueError: could not interpret dimensions
>
>
> Is there anything else I need to set up to use the morph.apply function?
>
>
> Thanks and Best,
> Gladia
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



More information about the Mne_analysis mailing list