Skip to content

ENH: support multiple simultaneous overlays in Brain.add_data#13995

Open
payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:enh/multi-overlay-add-data
Open

ENH: support multiple simultaneous overlays in Brain.add_data#13995
payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:enh/multi-overlay-add-data

Conversation

@payamsash

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Closes #11503.

What does this implement/fix?

The rendering side is already ready (#13970), so it can keep multiple named overlays together. This PR is on the Brain side so it can track more than one dataset at a time, and connecting remove_existing=False to actually work. so WDYT about these steps @larsoner?

  1. modify self._data to index datasets by key instead of overwriting, so multiple calls to add_data(..., key="stats") and add_data(..., key="data") can happen.
  2. connect remove_existing=False to call LayeredMesh.add_overlay with a new key.
  3. what to do about colorbar? let's just show the last added overlay colorbar (for now).

@larsoner

Copy link
Copy Markdown
Member

Yes @payamsash that sounds good to me!

Related to:

what to do about colorbar? let's just show the last added overlay colorbar (for now).

We also have an issue with interactivity, in that the Brain interface can have widgets that control colorbar limits for example. So we'll want to add a "data key" (maybe there is some better name?) drop-down there that allows controlling the limits for the given key / set of data, and we'll need some private var to track the currently "active" (meaning: colorbar is the one shown, and the limits / smoothing etc. changed by GUI interaction) data key.

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.

Plotting multiple overlays simultaneously with add_data function in MNE's Brain class

2 participants