No digitization points found

External Email - Use Caution

Dear MNE experts:

I have this issue because I don?t know how to manage a file .sfp for digitization. I have read the file with read_custom_montage but then I cannot use make_dig_montage. How is the proper way to do this?

SIncerely,
Andrade.

External Email - Use Caution

hi,

if you can read your sfp file with read_custom_montage you can then
use set_montage

montage = mne.channels.read_custom_montage('xxx.sfp')
raw.set_montage(montage)

should just work. Montage is already a DigMontage so no need to call
make_dig_montage

HTH
Alex

External Email - Use Caution

It should be working but it doesn't

raw.set_montage(montage)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "</home/andraderenew/.local/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-30>", line 2, in set_montage
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/utils/_logging.py", line 90, in wrapper
    return function(*args, **kwargs)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/channels/channels.py", line 488, in set_montage
    set_dig=set_dig, raise_if_subset=raise_if_subset)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/channels/montage.py", line 1545, in _set_montage
    _mnt = _get_montage_in_head(montage)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/channels/montage.py", line 1356, in _get_montage_in_head
    return transform_to_head(montage.copy())
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/channels/montage.py", line 935, in transform_to_head
    native_head_t = get_ras_to_neuromag_trans(nasion, lpa, rpa)
  File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/transforms.py", line 650, in get_ras_to_neuromag_trans
    raise ValueError("Points have to be provided as one dimensional "
ValueError: Points have to be provided as one dimensional arrays of length 3.

External Email - Use Caution

please open an issue at https://github.com/mne-tools/mne-python/issues
with some data and code so we can replicate.

thanks
Alex