<p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;"> External Email - Use Caution </span></p><p></p><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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 <a href="https://mne.tools/0.18/auto_examples/inverse/plot_morph_surface_stc.html#sphx-glr-auto-examples-inverse-plot-morph-surface-stc-py">this document</a>, I did:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.8pt">morph = mne.compute_source_morph(stc, <span style="color:rgb(102,0,153)">subject_from</span>=subject,<br> <span style="color:rgb(102,0,153)">subject_to</span>=avgsubject,<br> <span style="color:rgb(102,0,153)">subjects_dir</span>=subjects_dir)<br>stc_morphed = morph.apply(stc)</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.8pt"><br></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif">compute_source_morph worked, but morph.apply(stc) returned the error:</font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt">Traceback (most recent call last):<br> File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code<br> exec(code_obj, self.user_global_ns, self.user_ns)<br> File "<ipython-input-68-ae08f53d7c9d>", line 1, in <module><br> stc_morphed = morph.apply(stc)<br> File "</autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-281>", line 2, in apply<br> File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/utils/_logging.py", line 89, in wrapper<br> return function(*args, **kwargs)<br> File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/morph.py", line 366, in apply<br> out = _apply_morph_data(self, stc)<br> File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/mne/morph.py", line 1205, in _apply_morph_data<br> data = morph_mat * data<br> File "/autofs/eris/purdongp/users/gladia/anaconda3_20190708/lib/python3.7/site-packages/scipy/sparse/base.py", line 528, in __mul__<br> raise ValueError('could not interpret dimensions')<br>ValueError: could not interpret dimensions<font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif">Is there anything else I need to set up to use the morph.apply function?</font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9.8pt"><font face="arial, sans-serif">Thanks and Best,
Gladia</font></pre></div></div>