Looking at the spm-faces raw info:
In [3]: raw.info['dig']
Out[3]:
[{'coord_frame': 4,
'ident': 3,
'kind': 2,
'r': array([ 4.30736691e-09, 9.82968360e-02, 0.00000000e+00], dtype=float32)},
{'coord_frame': 4,
'ident': 1,
'kind': 2,
'r': array([ -7.32455477e-02, -3.20142135e-09, 0.00000000e+00], dtype=float32)},
{'coord_frame': 4,
'ident': 2,
'kind': 2,
'r': array([ 7.07898811e-02, 2.96859071e-09, 0.00000000e+00], dtype=float32)}]
but in the GUI we are selecting fiducial points with
d['kind'] == FIFF.FIFFV_POINT_CARDINAL
and
In [8]: FIFF.FIFFV_POINT_CARDINAL
Out[8]: 1
In [12]: FIFF.FIFFV_POINT_HPI
Out[12]: 2
so, is there something wrong with the spm-faces file (Fiducials stored as HPI)? Or are fiducials sometimes identical with HPI and the GUI should use them as such?
The latter would actually cause a conflict with our KIT files, because HPI points and fiducials which are not identical have the same ?ident?:
In [16]: [d for d in kraw.info['dig'] if d['kind'] < 3]
Out[16]:
[{'coord_frame': 4,
'ident': 2,
'kind': 1,
'r': array([ 0.00000000e+00, 1.07987508e-01, -1.38777878e-17], dtype=float32)},
{'coord_frame': 4,
'ident': 1,
'kind': 1,
'r': array([ -7.57353827e-02, 1.04083409e-17, 1.38777878e-17], dtype=float32)},
{'coord_frame': 4,
'ident': 3,
'kind': 1,
'r': array([ 6.99156001e-02, 0.00000000e+00, 1.38777878e-17], dtype=float32)},
{'coord_frame': 4,
'ident': 0,
'kind': 2,
'r': array([-0.07321275, 0.0070182 , -0.00094954], dtype=float32)},
{'coord_frame': 4,
'ident': 1,
'kind': 2,
'r': array([ 0.06706881, 0.01023183, -0.00318275], dtype=float32)},
{'coord_frame': 4,
'ident': 2,
'kind': 2,
'r': array([ 0.00344993, 0.11684198, 0.02777481], dtype=float32)},
{'coord_frame': 4,
'ident': 3,
'kind': 2,
'r': array([-0.03729108, 0.1059907 , 0.03130391], dtype=float32)},
{'coord_frame': 4,
'ident': 4,
'kind': 2,
'r': array([ 0.0470689 , 0.09996997, 0.03072358], dtype=float32)}]
Although a potential solution could use HPI only if no Cardinal points are present?