Skip to content

BUG: Only use valid FIFF values for anonymization - #9175

Merged
agramfort merged 1 commit into
mne-tools:mainfrom
hoechenberger:anonymize
Mar 21, 2021
Merged

agramfort merged 1 commit into
mne-tools:mainfrom
hoechenberger:anonymize

Conversation

@hoechenberger

@hoechenberger hoechenberger commented Mar 20, 2021 •

Copy link
Copy Markdown
Member

GH-9103 improved anonymization when keep_his=False; however, it would break I/O roundtrips because handedness
and sex would be set to values that aren't supported by the FIFF specs.

This PR changes the behavior such that anonymization sets sex = 0 (unknown) and entirely removes hand, as FIFF
doesn't specify an "unknown" handedness.

Also adds more testing coverage for Raw & Epochs I/O roundtrip after anonymization.

cc @Falach

@hoechenberger hoechenberger changed the title [DOC] Stc near sensors doc (#9160) BUG: Only use valid FIFF values for anonymization Mar 20, 2021
@hoechenberger
hoechenberger marked this pull request as ready for review March 20, 2021 21:59
mne-toolsGH-9103 improved anonymization when `keep_his=False`;
however, it would break I/O roundtrips because handedness
and sex would be set to values that aren't supported by
the FIFF specs.
@hoechenberger

Copy link
Copy Markdown
Member Author

@larsoner Circle still won't start for me, I've opened a ticket; hopefully they'll be able to resolve this soon.

@rob-luke rob-luke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I hit this issue with MNE-BIDS yesterday too, so great that its addressed so quickly.

@rob-luke

Copy link
Copy Markdown
Member

Also FYI: with this fork all MNE-BIDS tests passed locally on my machine.

@hoechenberger

Copy link
Copy Markdown
Member Author

@rob-luke Glad to hear it!! :)

@agramfort
agramfort merged commit b5e9c38 into mne-tools:main Mar 21, 2021
@agramfort

Copy link
Copy Markdown
Member

Thx @hoechenberger

@hoechenberger
hoechenberger deleted the anonymize branch March 21, 2021 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants