load digitization electrodes

Dear everyone,

I have a problem in loading the digitization of electrode in the epochs
objects.

I created the epochs
info = create_info(chan_names, sfreq, chan_types )
epochs = EpochsArray(data, info, events=None, tmin=np.min(time),
verbose=False)

digitization = read_dig_montage(hsp=positions.copy(), elp=positions.copy(),
point_names=labels, unit='mm')
epochs.set_montage(digitization)
epochs.plot_sensors()

when I tried to plot:
I got this error: RuntimeError: Did not find any digitization points of
kind FIFFV_POINT_EEG (3) in the info.

How I can solve this?

Thanks a lot

Edoardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180212/aa840a0f/attachment.html

Hi Edoardo,

try: epochs.set_montage(digitization, set_dig=True)

best,
Marijn.

Dear everyone,

I have a problem in loading the digitization of electrode in the epochs objects.

I created the epochs
info = create_info(chan_names, sfreq, chan_types )
epochs = EpochsArray(data, info, events=None, tmin=np.min(time), verbose=False)

digitization = read_dig_montage(hsp=positions.copy(), elp=positions.copy(), point_names=labels, unit='mm')
epochs.set_montage(digitization)
epochs.plot_sensors()

when I tried to plot:
I got this error: RuntimeError: Did not find any digitization points of kind FIFFV_POINT_EEG (3) in the info.

How I can solve this?

Thanks a lot

Edoardo
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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 . 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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1386 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180213/eef88cb5/attachment.bin

Dear Marijn

thanks. Did not help. If I print digitization I see channels 0. Should
the dig montage look different?

<DigMontage | 57 extras (headshape), 54 HPIs, 3 fiducials, 0 channels>

2018-02-12 23:27 GMT+01:00 Marijn van Vliet <w.m.vanvliet at gmail.com>:

Hi Edoardo,

try: epochs.set_montage(digitization, set_dig=True)

best,
Marijn.

>
> Dear everyone,
>
> I have a problem in loading the digitization of electrode in the epochs
objects.
>
> I created the epochs
> info = create_info(chan_names, sfreq, chan_types )
> epochs = EpochsArray(data, info, events=None, tmin=np.min(time),
verbose=False)
>
> digitization = read_dig_montage(hsp=positions.copy(),
elp=positions.copy(), point_names=labels, unit='mm')
> epochs.set_montage(digitization)
> epochs.plot_sensors()
>
> when I tried to plot:
> I got this error: RuntimeError: Did not find any digitization points of
kind FIFFV_POINT_EEG (3) in the info.
>
> How I can solve this?
>
> Thanks a lot
>
> Edoardo
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> Mne_analysis Info Page
>
>
> 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 . 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
Mne_analysis Info Page

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 . 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/20180213/7581ac70/attachment.html

Hey Edoardo,

There are two possible solutions for this. You can use the `read_montage`
function and construct an `.hpts` file. It's a four column space delimited
text file with the given extension. You can set the unit parameter to 'm',
'mm', 'cm'. You can then use the `set_montage` as Marijn suggested. Each
line should be as follow:

eeg Fp1 -95.0 -3. -3

The other solution would be to construct a fif file with the digitized
electrode information. For this, I don't know how to advise you.

HTH,

I solved with read_montage but I did not understand why read_dig_montage
did not work.

Thanks a lot for the help

2018-02-13 20:55 GMT+01:00 Teon Brooks <teon.brooks at gmail.com>:

Hey Edoardo,

There are two possible solutions for this. You can use the `read_montage`
function and construct an `.hpts` file. It's a four column space delimited
text file with the given extension. You can set the unit parameter to 'm',
'mm', 'cm'. You can then use the `set_montage` as Marijn suggested. Each
line should be as follow:

eeg Fp1 -95.0 -3. -3

The other solution would be to construct a fif file with the digitized
electrode information. For this, I don't know how to advise you.

HTH,

Dear Marijn

thanks. Did not help. If I print digitization I see channels 0. Should
the dig montage look different?

<DigMontage | 57 extras (headshape), 54 HPIs, 3 fiducials, 0 channels>

2018-02-12 23:27 GMT+01:00 Marijn van Vliet <w.m.vanvliet at gmail.com>:

Hi Edoardo,

try: epochs.set_montage(digitization, set_dig=True)

best,
Marijn.

>
> Dear everyone,
>
> I have a problem in loading the digitization of electrode in the
epochs objects.
>
> I created the epochs
> info = create_info(chan_names, sfreq, chan_types )
> epochs = EpochsArray(data, info, events=None, tmin=np.min(time),
verbose=False)
>
> digitization = read_dig_montage(hsp=positions.copy(),
elp=positions.copy(), point_names=labels, unit='mm')
> epochs.set_montage(digitization)
> epochs.plot_sensors()
>
> when I tried to plot:
> I got this error: RuntimeError: Did not find any digitization points
of kind FIFFV_POINT_EEG (3) in the info.
>
> How I can solve this?
>
> Thanks a lot
>
> Edoardo
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> Mne_analysis Info Page
>
>
> 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 . 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
Mne_analysis Info Page

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 . 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
Mne_analysis Info Page

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 . 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.

--
teon <http://www.twitter.com/teon_io&gt;, phd

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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 . 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/20180213/669afeb4/attachment-0001.html

glad that worked.

`read_dig_montage` was initially designed to deal with peripheral digitized
data such as headshape (hsp), hpi coil placement in device space (hpi),
fiducials and hpi points in head space (elp). It's been adapted to handle
some digitized electrode data but that currently supports points saved in
the .fif file (fif) and egi files (egi).

HTH,