Skip to content

Commit 4089c75

Browse files
committed
Fix round-trip descriptor preservation and remove redundant check
1 parent 662a5cc commit 4089c75

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

mne/_fiff/proj.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,11 @@ def _read_proj(fid, node, *, ch_names_mapping=None, verbose=None):
585585
# else:
586586
# nchan = global_nchan
587587

588-
tag = find_tag(fid, item, FIFF.FIFF_DESCRIPTION)
588+
tag = find_tag(fid, item, FIFF.FIFF_NAME)
589589
if tag is not None:
590590
desc = tag.data
591591
else:
592-
tag = find_tag(fid, item, FIFF.FIFF_NAME)
592+
tag = find_tag(fid, item, FIFF.FIFF_DESCRIPTION)
593593
if tag is not None:
594594
desc = tag.data
595595
else:
@@ -707,9 +707,7 @@ def _write_proj(fid, projs, *, ch_names_mapping=None):
707707

708708
write_int(fid, FIFF.FIFF_PROJ_ITEM_NVEC, proj["data"]["nrow"])
709709

710-
if proj.get("desc") is not None:
711-
write_string(fid, FIFF.FIFF_NAME, proj["desc"])
712-
710+
713711

714712
if proj["active"] is not None:
715713
val = 1 if proj["active"] else 0

0 commit comments

Comments
 (0)