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

Gladia Hotan gladiach at gmail.com
Thu Jun 25 21:52:50 EDT 2020
Search archives:

        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
<https://mne.tools/0.18/auto_examples/inverse/plot_morph_surface_stc.html#sphx-glr-auto-examples-inverse-plot-morph-surface-stc-py>,
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200625/12e8301d/attachment.html 


More information about the Mne_analysis mailing list