ENH: support multiple simultaneous overlays in Brain.add_data#13995
ENH: support multiple simultaneous overlays in Brain.add_data#13995payamsash wants to merge 12 commits into
Conversation
|
Yes @payamsash that sounds good to me! Related to:
We also have an issue with interactivity, in that the |
|
for the interactivity I will open another PR (but probably not soon), as I now have a good view how it works, but I think its quite challenging (at least compared to this one). |
…k from previous PR
…one and fix _get_range to use _active_data
d46dc2e to
a6a9079
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
FYI if you In the meantime I've started CircleCI and will review |
larsoner
left a comment
There was a problem hiding this comment.
Okay I get the architecture here now. It makes sense. But I have a slightly different proposal that will help minimize diff, and thus help preserve blame and reduce review burden. Instead of what is currently implemented:
- Modify
self._datato be the dict-of-dicts storing all datasets - Add
self._active_data_keyto track what the "active" key is - Add
self._active_dataas a@propertythat wraps toself._data[self._active_data_key]
How about
- Add
self._all_datato be the dict-of-dicts storing all datasets - Add
self._dataas a@propertythat wraps toself._all_data[self._active_data_key]
It makes the code naming slightly worse, but it should make the diff much smaller, which helps maintainability (because of how blame, mostly).
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
Brainside so it can track more than one dataset at a time, and connectingremove_existing=Falseto actually work. so WDYT about these steps @larsoner?self._datato index datasets by key instead of overwriting, so multiple calls toadd_data(..., key="stats")andadd_data(..., key="data")can happen.remove_existing=Falseto callLayeredMesh.add_overlaywith a new key.