Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/dev/13672.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow reading alternative nasion label ("Nz") in SNIRF files when parsing landmarkPos3D, by :newcontrib:`Aniket Singh Yadav`.
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.. _Andrew Gilbert: https://github.com/adgilbert
.. _Andrew Quinn: https://github.com/ajquinn
.. _Aniket Pradhan: https://github.com/Aniket-Pradhan
.. _Aniket Singh Yadav: https://github.com/Aniketsy
.. _Anna Padee: https://github.com/apadee/
.. _Annalisa Pascarella: https://github.com/annapasca
.. _Anne-Sophie Dubarry: https://github.com/annesodub
Expand Down
2 changes: 1 addition & 1 deletion mne/io/snirf/_snirf.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def natural_keys(text):
dign = dign.lower()
if dign in [b"lpa", b"al"]:
lpa = diglocs[idx, :3]
elif dign in [b"nasion"]:
elif dign in [b"nasion", b"nz"]:
nasion = diglocs[idx, :3]
elif dign in [b"rpa", b"ar"]:
rpa = diglocs[idx, :3]
Expand Down
11 changes: 7 additions & 4 deletions mne/io/tests/test_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,16 @@ def _test_raw_reader(
# make sure that dig points in head coords implies that fiducials are
# present
if len(raw.info["dig"] or []) > 0:
card_pts = [
d for d in raw.info["dig"] if d["kind"] == _dig_kind_dict["cardinal"]
card_pts_head = [
d
for d in raw.info["dig"]
if d["kind"] == _dig_kind_dict["cardinal"]
and d["coord_frame"] == FIFF.FIFFV_COORD_HEAD
]
eeg_dig_head = [d for d in eeg_dig if d["coord_frame"] == FIFF.FIFFV_COORD_HEAD]
if len(eeg_dig_head):
assert len(card_pts) == 3, "Cardinal points missing"
if len(card_pts) == 3: # they should all be in head coords then
assert len(card_pts_head) == 3, "Cardinal points missing"
if len(card_pts_head) == 3: # they should all be in head coords then
assert len(eeg_dig_head) == len(eeg_dig)

return raw
Expand Down