File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Allow reading alternative nasion label ("Nz") in SNIRF files when parsing landmarkPos3D, by :newcontrib: `Aniket Singh Yadav `.
Original file line number Diff line number Diff line change 2222.. _Andrew Gilbert : https ://github . com /adgilbert
2323.. _Andrew Quinn : https ://github . com /ajquinn
2424.. _Aniket Pradhan : https ://github . com /Aniket -Pradhan
25+ .. _Aniket Singh Yadav : https ://github . com /Aniketsy
2526.. _Anna Padee : https ://github . com /apadee /
2627.. _Annalisa Pascarella : https ://github . com /annapasca
2728.. _Anne -Sophie Dubarry : https ://github . com /annesodub
Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ def natural_keys(text):
399399 dign = dign .lower ()
400400 if dign in [b"lpa" , b"al" ]:
401401 lpa = diglocs [idx , :3 ]
402- elif dign in [b"nasion" ]:
402+ elif dign in [b"nasion" , b"nz" ]:
403403 nasion = diglocs [idx , :3 ]
404404 elif dign in [b"rpa" , b"ar" ]:
405405 rpa = diglocs [idx , :3 ]
Original file line number Diff line number Diff line change @@ -520,13 +520,16 @@ def _test_raw_reader(
520520 # make sure that dig points in head coords implies that fiducials are
521521 # present
522522 if len (raw .info ["dig" ] or []) > 0 :
523- card_pts = [
524- d for d in raw .info ["dig" ] if d ["kind" ] == _dig_kind_dict ["cardinal" ]
523+ card_pts_head = [
524+ d
525+ for d in raw .info ["dig" ]
526+ if d ["kind" ] == _dig_kind_dict ["cardinal" ]
527+ and d ["coord_frame" ] == FIFF .FIFFV_COORD_HEAD
525528 ]
526529 eeg_dig_head = [d for d in eeg_dig if d ["coord_frame" ] == FIFF .FIFFV_COORD_HEAD ]
527530 if len (eeg_dig_head ):
528- assert len (card_pts ) == 3 , "Cardinal points missing"
529- if len (card_pts ) == 3 : # they should all be in head coords then
531+ assert len (card_pts_head ) == 3 , "Cardinal points missing"
532+ if len (card_pts_head ) == 3 : # they should all be in head coords then
530533 assert len (eeg_dig_head ) == len (eeg_dig )
531534
532535 return raw
You can’t perform that action at this time.
0 commit comments