# Calculate forward model using digitization from	eximia system

**URL:** <https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 7, 2016, 1:48am UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079 "2016-09-07T01:48:24Z")\
**Posts on this page:** 9\
**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:** [September 7, 2016, 1:48am UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/1 "2016-09-07T01:48:24Z")

</div>

Dear List,

I'm following this tutorial

[http://martinos.org/mne/stable/auto\_tutorials/plot\_forward.html](http://martinos.org/mne/stable/auto_tutorials/plot_forward.html)

and trying to compute the forward model using individual anatomical  
information.

So far I got the skull/skin surfaces using mne watershed\_bem, and now I'm  
trying to use the mne.gui.coregistration the generate the -trans file.

However, the digitization information is an eximia .nbe file. I found a  
thread about converting it to FIF

[https://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/2013-March/001465.html](https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2013-March/001465.html)

but it suggests using the mne\_eximia2fif, and my eeg data is not acquired  
with the eximia system, only the digitization.

The digitization consists of 3D positions for each electrodes + fiducial,  
which I have imported into python as numpy.array.

Should I use mne.channels.read\_dig\_montage and update info['dig'] manually?

I tried

import mne.channels.read\_dig\_montage  
digitization = read\_dig\_montage(elp=my\_data[:, 1:], point\_names=ch\_names)

where my\_data[:, 1:] are the coordinates of the electrodes in mm, and the  
first 3 lines are ['nasion', 'lpa', 'rpa'] (ch\_names has the strings with  
the fiducial and electrodes names)

However I get this error:

---

<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:** [September 9, 2016, 1:07pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/2 "2016-09-09T13:07:10Z")

</div>

Hi Leonardo,

> I'm following this tutorial
> 
> [http://martinos.org/mne/stable/auto\_tutorials/plot\_forward.html](http://martinos.org/mne/stable/auto_tutorials/plot_forward.html)
> 
> and trying to compute the forward model using individual anatomical  
> information.
> 
> So far I got the skull/skin surfaces using mne watershed\_bem, and now I'm  
> trying to use the mne.gui.coregistration the generate the -trans file.
> 
> However, the digitization information is an eximia .nbe file. I found a  
> thread about converting it to FIF
> 
> [[Mne\_analysis] mne\_eximia2fiff: digitizer data ordering](https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2013-March/001465.html)
> 
> but it suggests using the mne\_eximia2fif, and my eeg data is not acquired  
> with the eximia system, only the digitization.
> 
> The digitization consists of 3D positions for each electrodes + fiducial,  
> which I have imported into python as numpy.array.
> 
> Should I use mne.channels.read\_dig\_montage and update info['dig'] manually?

yes that's the entry point.

see the structure of a DigMontage object and maybe see if you can create one  
directly.

let us know if it works

Alex

---

<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 26, 2016, 4:44pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/3 "2016-10-26T16:44:09Z")

</div>

I know it has been a while, but I finally went back to this project and  
managed to create the DigMontage using the mne.channels.read\_dig\_montage

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;digitization = read\_dig\_montage(hsp=positions.copy(),  
elp=positions.copy(), point\_names=labels, unit='mm')

positions is a ndarray (N,3) and labels is a list (N), where N is the  
number of entries in the digitization file: 257 electrodes + 3 fiducials  
here is an example of .sfp file I get from the digitization process and  
used to generate the position and labels objects through csv.reader() :

[https://drive.google.com/open?id=0B0p7WZ2wlTFSazJWbENnN0JnMkU](https://drive.google.com/open?id=0B0p7WZ2wlTFSazJWbENnN0JnMkU)

I then used set\_montage to update the info['dig'] entry ( knowing that I  
already called this function before with a normal Montage, to set the  
electrodes positions, since info['ch\_names'] is not updated by  
read\_dig\_montage)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raw.set\_montage(digitization)

It works, but I'm not sure if this is the correct way to do it.  
\*Is it ok to use electrodes as head points?\*  
\*Is it not enough to use the fiducials alone?\*

Perhaps I should open a new thread less specific about eximia, since my  
question is more generic:\* how can I align electrodes to individual MRIs  
just having the fiducials from the digitization process in a text file?\*

I found this thread, but no it is not quite the same since I do have the  
MRI, but the co-registration is not in any supported format (Polhemus, etc)

[https://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/2016-June/003414.html](https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2016-June/003414.html)

In any case, now I can save the raw with the info['dig'] information (lpa,  
rpa and nasion) and use it to create the trans file using the  
mne.gui.coregistration (through "mne coreg" in the command line,  
[http://www.slideshare.net/mne-python/mnepython-coregistration](http://www.slideshare.net/mne-python/mnepython-coregistration))

However, for some reason all the electrodes are quite far from the scalp,  
even though the fiducials were aligned:

[https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc](https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc)  
[https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M](https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M)

since it happened with 5 subjects, and the error is always similar, I think  
it is unlikely to be a simple switch between subjects digitization (I  
double checked the origin of the files in any case)  
it could be, however, a systematic error in the acquisition... But this  
system was successfully used with brainstorm, so I would not start with  
this hypothesis.

\*Does anybody have another idea why this could be happening?\*  
\*Or how could I fix that?\*

I could morph the MRI if needed, but since I'm using individual MRIs with  
the co-registration, wouldn't that be a waste and similar to using  
generic/fsaverage MRI?

Thank you for any help,  
Leonardo

2016-09-09 8:07 GMT-05:00 Alexandre Gramfort \<alexandre.gramfort at telecom-  
paristech.fr\>:

> Hi Leonardo,
> 
> \> I'm following this tutorial  
> \>  
> \> [http://martinos.org/mne/stable/auto\_tutorials/plot\_forward.html](http://martinos.org/mne/stable/auto_tutorials/plot_forward.html)  
> \>  
> \> and trying to compute the forward model using individual anatomical  
> \> information.  
> \>  
> \> So far I got the skull/skin surfaces using mne watershed\_bem, and now I'm  
> \> trying to use the mne.gui.coregistration the generate the -trans file.  
> \>  
> \> However, the digitization information is an eximia .nbe file. I found a  
> \> thread about converting it to FIF  
> \>  
> \> [https://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/2013](https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2013)  
> -March/001465.html  
> \>  
> \> but it suggests using the mne\_eximia2fif, and my eeg data is not acquired  
> \> with the eximia system, only the digitization.  
> \>  
> \> The digitization consists of 3D positions for each electrodes + fiducial,  
> \> which I have imported into python as numpy.array.  
> \>  
> \> Should I use mne.channels.read\_dig\_montage and update info['dig']  
> manually?
> 
> yes that's the entry point.
> 
> see the structure of a DigMontage object and maybe see if you can create  
> one  
> directly.
> 
> let us know if it works
> 
> Alex
> 
> \> I tried  
> \>  
> \> import mne.channels.read\_dig\_montage  
> \> digitization = read\_dig\_montage(elp=my\_data[:, 1:],  
> point\_names=ch\_names)  
> \>  
> \> where my\_data[:, 1:] are the coordinates of the electrodes in mm, and the  
> \> first 3 lines are ['nasion', 'lpa', 'rpa'] (ch\_names has the strings with  
> \> the fiducial and electrodes names)  
> \>  
> \> However I get this error:  
> \>  
> \> ===========================================  
> \>  
> \> In [48]: read\_dig\_montage(elp=my\_data[:, 1:],  
> point\_names=montage.ch\_names)  
> \> ------------------------------------------------------------  
> ---------------  
> \> TypeError Traceback (most recent call  
> last)  
> \> \<ipython-input-48-c58c337206f3\> in \<module\>()  
> \> ----\> 1 read\_dig\_montage(hsp=None, elp=my\_data[:, 1:],  
> \> point\_names=montage.ch\_names)  
> \>  
> \> /home/leonardo/projects/mne-python/mne/channels/montage.pyc in  
> \> read\_dig\_montage(hsp, hpi, elp, point\_names, unit, fif, transform,  
> \> dev\_head\_t)  
> \> 608 fids = apply\_trans(neuromag\_trans, [nasion, lpa,  
> rpa])  
> \> 609 elp = apply\_trans(neuromag\_trans, elp)  
> \> --\> 610 hsp = apply\_trans(neuromag\_trans, hsp)  
> \> 611 else:  
> \> 612 fids = [None] \* 3  
> \>  
> \> /home/leonardo/projects/mne-python/mne/transforms.pyc in  
> apply\_trans(trans,  
> \> pts, move)  
> \> 172  
> \> 173 # apply rotation & scale  
> \> --\> 174 out\_pts = np.dot(pts, trans[:3, :3].T)  
> \> 175 # apply translation  
> \> 176 if move is True:  
> \>  
> \> TypeError: unsupported operand type(s) for \*: 'NoneType' and 'float'  
> \>  
> \> ===========================================  
> \>  
> \> Looks like hsp is mandatory, but I don't have the Polhemus information...  
> \>  
> \> Is there an easier way to create the -trans file and calculate the  
> forward  
> \> model using individual electrodes positions from the eximia system (or  
> \> np.array with the electrodes coordinates for that matter)?  
> \>  
> \> Thank you very much in advance for any help,  
> \>  
> \> Leonardo  
> \>  
> \>  
> \>  
> \>  
> \>  
> \>  
> \>  
> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> Mne\_analysis mailing list  
> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \> The information in this e-mail is intended only for the person to whom  
> it is  
> \> addressed. If you believe this e-mail was sent to you in error and the  
> \> e-mail  
> \> contains patient information, please contact the Partners Compliance  
> \> HelpLine at  
> \> [http://www.partners.org/complianceline](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> in  
> \> error  
> \> but does not contain patient information, please contact the sender and  
> \> properly  
> \> dispose of the e-mail.  
> \>  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/6727e387/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/6727e387/attachment.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 26, 2016, 4:59pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/4 "2016-10-26T16:59:36Z")

</div>

I suspect the point digitized was not actually on the scalp. I have  
seen other groups have systematic issues like this, when they don't  
place the digitizer pen directly on the scalp (typically on top of an  
electrode: which is often a bad idea for multiple reasons; although  
occasionally unavoidable). MNE should handle this fine and use the  
closest point on the scalp, but I would recommend for future data  
collection that the pen is put inside the electrode on the scalp  
itself (be careful, some digitizer pens are sharp).

hth  
d

---

<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 26, 2016, 5:02pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/5 "2016-10-26T17:02:49Z")

</div>

> I know it has been a while, but I finally went back to this project and  
> managed to create the DigMontage using the mne.channels.read\_dig\_montage.  
> ..  
> It works, but I'm not sure if this is the correct way to do it.

Given that your alignments look approximately correct (other than the  
scaling issue!) I suspect these steps are correct. Can you open an  
MNE-Python issue with this procedure? It would be good if we could turn it  
into a tutorial or improve the docs to describe it.

> \*Is it ok to use electrodes as head points?\*

If you don't have "extra" points directly on the scalp, I would say that  
electrodes can be used, yes. But keep in mind how your digitization was  
actually done during the experiment; some electrodes (e.g., BrainVision  
actiCap \<[http://www.brainproducts.com/productdetails.php?id=4&gt;\](http://www.brainproducts.com/productdetails.php?id=4&gt;%5C)) are  
actually a bit thick, say half a centimeter, so if they were digitized on  
the center of those electrodes, you'd expect them to be that far off of the  
MRI during coregistration.

\*Is it not enough to use the fiducials alone?\*

> 

You can use just the fiducials, but fitting a the rotation + translation  
using three points manually placed on an MRI surface is might be less  
robust than fitting extra dig points. So it depends on how much you trust  
your fiducial digitization and your ability to pinpoint those equivalent  
locations no an MRI.

Perhaps I should open a new thread less specific about eximia, since my

> question is more generic:\* how can I align electrodes to individual MRIs  
> just having the fiducials from the digitization process in a text file?\*

We have an eXimia data-reading pull request open  
\<[https://github.com/mne-tools/mne-python/pull/3523&gt;](https://github.com/mne-tools/mne-python/pull/3523&gt;), and support is a  
work-in-progress. So I suggest we discuss eXimia things there to converge  
on something usable.

The digitization issues are more generic, and hopefully someone else can  
comment more meaningfully. I don't have much experience with it. But in  
theory once you have your info['dig'] populated properly via DigMontage,  
using the coreg gui in MNE-Python, or even saving the data to FIF and using  
mne\_analyze should be possible. But it sounds like you have already gone  
that route...

However, for some reason all the electrodes are quite far from the scalp,

> even though the fiducials were aligned:
> 
> [https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc](https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc)  
> [https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M](https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M)
> 
> since it happened with 5 subjects, and the error is always similar, I  
> think it is unlikely to be a simple switch between subjects digitization (I  
> double checked the origin of the files in any case)  
> it could be, however, a systematic error in the acquisition... But this  
> system was successfully used with brainstorm, so I would not start with  
> this hypothesis.

I assume by this you mean the plots looked okay in BrainStorm, so we need  
to dig into it a bit.

It's possible that BrainStorm projects the electrodes onto the scalp for  
visualization. Do you have data from one subject you could share? If so,  
feel free to open an MNE-Python issue and we can work through it. For  
example, as a first pass you could look at the distribution histogram of  
the dig points in X and Y, and do the same thing for the MRI head surface  
coordinates. You can also look at the transformation matrix and ensure that  
it's a pure rotation + translation matrix, with no scaling (but it really  
should be!).

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/9c9d3478/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/9c9d3478/attachment.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 26, 2016, 5:25pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/6 "2016-10-26T17:25:53Z")

</div>

2016-10-26 11:59 GMT-05:00 dgw \<dgwakeman at gmail.com\>:

> I suspect the point digitized was not actually on the scalp. I have  
> seen other groups have systematic issues like this, when they don't  
> place the digitizer pen directly on the scalp (typically on top of an  
> electrode: which is often a bad idea for multiple reasons; although  
> occasionally unavoidable).

I understand, since I was not there I do not know if this is the case.  
Although I though it was a bit to far for that. I'll check if the distance  
match the height of the electrodes!

> MNE should handle this fine and use the  
> closest point on the scalp,

Cool, I saw this before in fieldtrip but I didn't see the option in  
mne.channels.coregistration() gui  
Which function is supposed to do that? mne.make\_forward\_solution() ?

Thanks!  
Leonardo  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/94e929a3/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/94e929a3/attachment.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 26, 2016, 5:35pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/7 "2016-10-26T17:35:16Z")

</div>

> Cool, I saw this before in fieldtrip but I didn't see the option in  
> mne.channels.coregistration() gui  
> Which function is supposed to do that? mne.make\_forward\_solution() ?

Yeah, deep within the forward code it does this projection. I suppose we  
could add that an option to project electrodes in plot\_trans and/or the  
GUI. Feel free to open an issue for that while we're at it.

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/dfd4b049/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/dfd4b049/attachment.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 26, 2016, 6:59pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/8 "2016-10-26T18:59:11Z")

</div>

2016-10-26 12:02 GMT-05:00 Eric Larson \<larson.eric.d at gmail.com\>:

> I know it has been a while, but I finally went back to this project and
> 
> > managed to create the DigMontage using the mne.channels.read\_dig\_montage.  
> > ..  
> > It works, but I'm not sure if this is the correct way to do it.
> 
> Given that your alignments look approximately correct (other than the  
> scaling issue!) I suspect these steps are correct. Can you open an  
> MNE-Python issue with this procedure? It would be good if we could turn it  
> into a tutorial or improve the docs to describe it.

I opened the issue in github, I can help to write the tutorial.

> > \*Is it ok to use electrodes as head points?\*
> 
> If you don't have "extra" points directly on the scalp, I would say that  
> electrodes can be used, yes. But keep in mind how your digitization was  
> actually done during the experiment; some electrodes (e.g., BrainVision  
> actiCap \<[actiCAP slim/snap | Brain Products GmbH](http://www.brainproducts.com/productdetails.php?id=4&gt;%5C)) are  
> actually a bit thick, say half a centimeter, so if they were digitized on  
> the center of those electrodes, you'd expect them to be that far off of the  
> MRI during coregistration.

Indeed, I think this is what is happening. I'm checking to see if this was  
the case.

> \*Is it not enough to use the fiducials alone?\*
> 
> > 
> 
> You can use just the fiducials, but fitting a the rotation + translation  
> using three points manually placed on an MRI surface is might be less  
> robust than fitting extra dig points. So it depends on how much you trust  
> your fiducial digitization and your ability to pinpoint those equivalent  
> locations no an MRI.

I see, the problem is the noise in the acquisition of the fiducials, which  
could be minimized by extra points assuming the error in measurement is  
gaussian. I always wandered why the extra points if three is enough in the  
ideal world 😉

> Perhaps I should open a new thread less specific about eximia, since my
> 
> > question is more generic:\* how can I align electrodes to individual MRIs  
> > just having the fiducials from the digitization process in a text file?\*
> 
> We have an eXimia data-reading pull request open  
> \<[https://github.com/mne-tools/mne-python/pull/3523&gt;](https://github.com/mne-tools/mne-python/pull/3523&gt;), and support is a  
> work-in-progress. So I suggest we discuss eXimia things there to converge  
> on something usable.

Since I do not have Eximia EEG data in this project (.nxe), I think it is a  
bit different from this thread.

> The digitization issues are more generic, and hopefully someone else can  
> comment more meaningfully. I don't have much experience with it. But in  
> theory once you have your info['dig'] populated properly via DigMontage,  
> using the coreg gui in MNE-Python, or even saving the data to FIF and using  
> mne\_analyze should be possible. But it sounds like you have already gone  
> that route...

yes, I'm just not sure which is the best/simpler way of doing it.  
For instance I think it is weird to call set\_montage twice...

> However, for some reason all the electrodes are quite far from the scalp,
> 
> > even though the fiducials were aligned:
> > 
> > [https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc](https://drive.google.com/open?id=0B0p7WZ2wlTFSNklmcTlPakJERXc)  
> > [https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M](https://drive.google.com/open?id=0B0p7WZ2wlTFScXF4NGMtNXBiZ2M)
> > 
> > since it happened with 5 subjects, and the error is always similar, I  
> > think it is unlikely to be a simple switch between subjects digitization (I  
> > double checked the origin of the files in any case)  
> > it could be, however, a systematic error in the acquisition... But this  
> > system was successfully used with brainstorm, so I would not start with  
> > this hypothesis.
> 
> I assume by this you mean the plots looked okay in BrainStorm, so we need  
> to dig into it a bit.

Yes

> It's possible that BrainStorm projects the electrodes onto the scalp for  
> visualization.

I also think this was the case

> Do you have data from one subject you could share? If so, feel free to  
> open an MNE-Python issue and we can work through it.

I'll look for one example.

> For example, as a first pass you could look at the distribution histogram  
> of the dig points in X and Y, and do the same thing for the MRI head  
> surface coordinates. You can also look at the transformation matrix and  
> ensure that it's a pure rotation + translation matrix, with no scaling (but  
> it really should be!).

It has to be, no? I never clicked the option to do scaling in the  
mne.gui.coregistration!  
I'll check the histograms, also of the distances betweem electrodes and  
scalp (they seem to be quite constant, hence probably the elctrode height)

Thank you,  
Leonardo

> Eric
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/75722c0e/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/75722c0e/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 26, 2016, 7:08pm UTC](https://mne.discourse.group/t/calculate-forward-model-using-digitization-from-eximia-system/1079/9 "2016-10-26T19:08:19Z")

</div>

2016-10-26 12:35 GMT-05:00 Eric Larson \<larson.eric.d at gmail.com\>:

> Cool, I saw this before in fieldtrip but I didn't see the option in
> 
> > mne.channels.coregistration() gui  
> > Which function is supposed to do that? mne.make\_forward\_solution() ?
> 
> Yeah, deep within the forward code it does this projection. I suppose we  
> could add that an option to project electrodes in plot\_trans and/or the  
> GUI. Feel free to open an issue for that while we're at it.

I opened an issue about that

> <https://github.com/mne-tools/mne-python/issues/3700>
>
> Since \`mne.make\_forward\_solution\` will project electrodes onto scalp before calc…ulations, wouldn't it be better to do so during \`mne.gui.coregistration\`, using a button "project" or something like that?
> 
> This was we can visualize the real position of electrodes, that might be far from scalp due to digitization issues.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20161026/2312becc/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161026/2312becc/attachment.html)
