You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
read_dig_hpts crashes on BioSemi-style .hpts with named cardinal fiducials #14538
mne.channels.read_dig_hpts fails on the BioSemi cap coordinates file shipped in the repository (mne/io/edf/tests/data/biosemi.hpts). That file uses text cardinal labels (nasion, lpa, rpa), while read_dig_hpts only maps numeric identifiers (1, 2, 3) for cardinal rows (as in the docstring example and mne/io/brainvision/tests/data/test.hpts).
The EDF test suite already references this file with a comment # XXX: missing reader, so the failure looks unintentional.
Steps to reproduce
frompathlibimportPathimportmne# From a clone of mne-python (adjust if installed differently):repo=Path(mne.__file__).resolve().parents[1]
fname=repo/"io"/"edf"/"tests"/"data"/"biosemi.hpts"frommne.channelsimportread_dig_hptsmontage=read_dig_hpts(fname)
print(montage)
read_dig_hpts returns a DigMontage with EEG electrode positions and three cardinal fiducials (nasion, lpa, rpa), similar to other .hpts files that load successfully (e.g. mne/io/brainvision/tests/data/test.hpts).
Actual results
Traceback (most recent call last):
...
File ".../mne/channels/montage.py", line 1177, in read_dig_hpts
fid_idx_to_label[label[ii]]: this_xyz
KeyError: 'nasion'
changed the title [-]**`read_dig_hpts` crashes on BioSemi-style `.hpts` with named cardinal fiducials**[/-][+]`read_dig_hpts` crashes on BioSemi-style `.hpts` with named cardinal fiducials[/+]on Nov 16, 2026
Activity
[-]**`read_dig_hpts` crashes on BioSemi-style `.hpts` with named cardinal fiducials**[/-][+]`read_dig_hpts` crashes on BioSemi-style `.hpts` with named cardinal fiducials[/+]Jay2006sawant commentedon Nov 16, 2026
cc : @larsoner @drammock