[Mne_analysis] Calculate forward model using digitization from eximia system

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Fri Sep 9 09:07:10 EDT 2016
Search archives:

Hi Leonardo,

> I'm following this tutorial
>
> 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
>
> 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
>
>
> 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 . 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.
>


More information about the Mne_analysis mailing list