We are attempting to read .con files from KIT system, and mne.io.read_raw_kit() runs into an error when there are missing marker coils. This seems to be caused by retrieving coordinates for markers (e.g. 'hpi_1') when they don't exist (line 716 in mne/io/kit/kit.py).
We propose the following solution, which checks whether a marker coil exists before retrieving its values:
# nasion, lpa, rpa, HPI in native space
#elp = [dig.pop(key) for key in (
# 'fidnz', 'fidt9', 'fidt10',
# 'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4')]
elp = []
for key in (
'fidnz', 'fidt9', 'fidt10',
'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4'):
if key in dig:
elp.append(dig.pop(key))
Hello,
We are attempting to read .con files from KIT system, and mne.io.read_raw_kit() runs into an error when there are missing marker coils. This seems to be caused by retrieving coordinates for markers (e.g. 'hpi_1') when they don't exist (line 716 in mne/io/kit/kit.py).
We propose the following solution, which checks whether a marker coil exists before retrieving its values:
@JD-Zhu @paulsowman