# How to obtain MNI coords using mne.vertex\_to\_mni	(newbie)

**URL:** <https://mne.discourse.group/t/how-to-obtain-mni-coords-using-mne-vertex-to-mni-newbie/1515>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 10, 2018, 12:14am UTC](https://mne.discourse.group/t/how-to-obtain-mni-coords-using-mne-vertex-to-mni-newbie/1515 "2018-05-10T00:14:16Z")\
**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:** [May 10, 2018, 12:14am UTC](https://mne.discourse.group/t/how-to-obtain-mni-coords-using-mne-vertex-to-mni-newbie/1515/1 "2018-05-10T00:14:16Z")

</div>

External Email - Use Caution

Hi,

In order to obtain the MNI coordinates of my MEG data, I have to use  
mne.vertex\_to\_mni.  
Could someone give me an example of its usage?

As for the first argument, how to obtain the vertex numbers of my data? I'm  
new in Python. Then, second argument, I can't find what code is right or  
left hemisphere. Is there a way to get in one output both hemispheres (=the  
whole brain)?

Thank you,  
Adela

This is the help of the function:

mne.vertex\_to\_mni(\*vertices\*, \*hemis\*, \*subject\*, \*subjects\_dir=None\*,  
\*mode=None\*, \*verbose=None\*)  
[source]  
\<[http://github.com/mne-tools/mne-python/blob/master/doc/\<string\>#L1129-L1187](http://github.com/mne-tools/mne-python/blob/master/doc/%3Cstring%3E#L1129-L1187)\>  
\<[https://martinos.org/mne/dev/generated/mne.vertex\_to\_mni.html#mne.vertex\_to\_mni](https://martinos.org/mne/dev/generated/mne.vertex_to_mni.html#mne.vertex_to_mni)\>

Convert the array of vertices for a hemisphere to MNI coordinates.  
Parameters: \*vertices\* : int, or list of int

Vertex number(s) to convert  
\*hemis\* : int, or list of int

Hemisphere(s) the vertices belong to

Name of the subject to load surfaces from.  
\*subjects\_dir\* : string, or None

Path to SUBJECTS\_DIR if it is not set in the environment.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20180510/1b707dc9/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180510/1b707dc9/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:** [May 10, 2018, 7:35am UTC](https://mne.discourse.group/t/how-to-obtain-mni-coords-using-mne-vertex-to-mni-newbie/1515/2 "2018-05-10T07:35:03Z")

</div>

External Email - Use Caution

hi,

what do you mean your MEG data?

vertices here are SourceEstimate (aka stc) vertices.

HTH  
Alex
