Skip to content

Support custom diagonal source covariance matrix for inverse operator - #14315

Open
ttaiv wants to merge 7 commits into
mne-tools:mainfrom
ttaiv:source-covariance
Open

ttaiv wants to merge 7 commits into
mne-tools:mainfrom
ttaiv:source-covariance

Conversation

@ttaiv

@ttaiv ttaiv commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Related to #8666.

Implemented support for custom diagonal source covariance matrix by adding source_cov parameter for mne.minimum_norm.make_inverse_operator. The motivation for this addition is to use source_cov to address the different densities of cortical and cerebellar meshes (output of the CMB package, related PR #14130) by setting prior source variances equal to the areas represented by each source.

I created draft implementation and tests with Claude Sonnet 5 and then manually refined them.

@ttaiv
ttaiv requested a review from agramfort as a code owner September 18, 2026 13:10
@welcome

welcome Bot commented Sep 18, 2026

Copy link
Copy Markdown

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

@larsoner larsoner 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.

@ttaiv looked reasonable to me but I saw some opportunities for simplification, can you look to see if you're still happy with the changes?

@ttaiv

ttaiv commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Yes I'm happy with the changes. Simplified code looks good!

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.

2 participants