Skip to content

Splitting _brain.py into multiple modules (phase 8) - #14571

Open
payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:brain-hemi-dataclass
Open

payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:brain-hemi-dataclass

Conversation

@payamsash

Copy link
Copy Markdown
Member

8th phase of #14331 and following #14429.

This PR replaces the nested _all_data dicts and converts only the per hemisphere dicts into _HemiData data class.

P.S: now writing into brain.data[...] no longer affects the Brain. is this ok for you @larsoner ? and how should Brain.data be in long term?

Opus 5.5 reviewed my changes and I iterated over it.

@larsoner

larsoner commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

I like the dataclass change. I don't think data is really meant to be public a very good public API point... we should maybe get rid of it at some point. But for this PR we should say that .data is just for reference and, might return copies of data, and that modifying it will have no effect on the brain itself.

@payamsash

Copy link
Copy Markdown
Member Author

@larsoner thanks in advance.

@payamsash

Copy link
Copy Markdown
Member Author

@larsoner this is just a kind reminder in case it slipped your attention.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants