Skip to content

This adds the eLORETA_caliBrain.py script, which implements the eLORETA with posterior covariance matrix on our pseudo-EEG data. - #3

Merged
orabe merged 1 commit into
mainfrom
add-eloreta-script
May 8, 2025
Merged

orabe merged 1 commit into
mainfrom
add-eloreta-script

Conversation

@IsmailHuseynov

Copy link
Copy Markdown
Collaborator

This PR adds eLORETA_caliBrain.py, which:

  • Implements the eLORETA inverse operator and computes both the posterior mean and covariance.
  • Uses the Woodbury matrix identity to update the covariance far more efficiently.
  • After the regularization matrix R converges, applies an SVD-based spectral decomposition to both the posterior mean and covariance for numerical stability.
  • Builds on the BSI Zoo eLORETA code (which previously output only the posterior mean), now extending it to posterior covariance estimation.

@orabe

orabe commented May 8, 2025

Copy link
Copy Markdown
Collaborator

Thanks!

Suggestions:

1. Refactor File Location

For now I recommend placing eLORETA_caliBrain.py inside a new subfolder (to keep things organised and improve modularity):

calibrain/estimators/
└── eloreta.py

2. Integrate with CaliBrain Inverse Pipeline

Later, once tested, we can expose the new eloreta() interface via the main pipeline in:
source_estimation.py (line 242–243)
This allows the new eLORETA version to plug into the existing benchmarking automatically.

@orabe
orabe merged commit 0590af8 into main May 8, 2025
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