# stc morphing question {Disarmed}

**URL:** <https://mne.discourse.group/t/stc-morphing-question-disarmed/1651>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 31, 2018, 2:23pm UTC](https://mne.discourse.group/t/stc-morphing-question-disarmed/1651 "2018-10-31T14:23:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 31, 2018, 2:23pm UTC](https://mne.discourse.group/t/stc-morphing-question-disarmed/1651/1 "2018-10-31T14:23:35Z")

</div>

External Email - Use Caution

Are the morphing matrices computed using mne.compute\_morph\_matrix  
invertable?

if I call

morph\_mat = mne.compute\_morph\_matrix  
\<[https://martinos.org/mne/stable/generated/mne.compute\_morph\_matrix.html#mne.compute\_morph\_matrix](https://martinos.org/mne/stable/generated/mne.compute_morph_matrix.html#mne.compute_morph_matrix)\>(subject\_from,  
subject\_to,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stc\_from.vertices, vertices\_to,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subjects\_dir=subjects\_dir)

Is there a way to invert morph\_mat to map from 'subject\_to' to 'subject\_from'  
or should i just call compute\_morph\_matrix again, something like...

morph\_mat\_inv = mne.compute\_morph\_matrix  
\<[https://martinos.org/mne/stable/generated/mne.compute\_morph\_matrix.html#mne.compute\_morph\_matrix](https://martinos.org/mne/stable/generated/mne.compute_morph_matrix.html#mne.compute_morph_matrix)\>(subject\_to,  
subject\_from,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vertices\_to, stc\_from.vertices,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subjects\_dir=subjects\_dir)

switching the to/from subject and vertices.

Is this the best way to map back and forth between subjects?

Thanks!

Luke

p.s. The use case is to map a group of subjects to a template  
(fsaverage). Do stats, make labels  
etc., in the template space and then to map these labels back into each subject.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20181031/a1e068a7/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181031/a1e068a7/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 31, 2018, 9:30pm UTC](https://mne.discourse.group/t/stc-morphing-question-disarmed/1651/2 "2018-10-31T21:30:58Z")

</div>

External Email - Use Caution

hi,

yes switching the to/from subject and vertices is what I would do.

Alex
