Skip to content

BUG: Fix consistency bug with orig units - #11160

Merged
agramfort merged 3 commits into
mne-tools:mainfrom
larsoner:orig_units
Sep 13, 2022
Merged

agramfort merged 3 commits into
mne-tools:mainfrom
larsoner:orig_units

Conversation

@larsoner

Copy link
Copy Markdown
Member

Closes #11119

  1. Make raw._orig_units always a dict (often empty), easier than dealing with is not None (just check for emptiness if needed)
  2. Fix bug where _orig_units was not updated when picking/dropping channels or when adding channels

No need for latest.inc update because this is a private param only used AFAIK by MNE-BIDS. Maybe someday we should make this public somehow. But it seems like the correct fix is really perhaps to use the channel info about units and/or cals better someday.

@larsoner

Copy link
Copy Markdown
Member Author

Ready for review/merge from my end

@larsoner larsoner added this to the 1.2 milestone Sep 13, 2022
@agramfort
agramfort merged commit d74c0fa into mne-tools:main Sep 13, 2022
@agramfort

Copy link
Copy Markdown
Member

thx @larsoner

@sappelhoff

Copy link
Copy Markdown
Member

thanks @larsoner !

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.

add_channels should update _orig_units attribute

3 participants