Skip to content

Conversation

@larsoner
Copy link
Member

@larsoner larsoner commented Dec 26, 2019

Working on making eLORETA have units nAm.

Along the way Writing out some of the inverse derivations and adding equation links so that they are hopefully easier to follow.

This does not work, mostly opening PR so that @agramfort can look at where I've messed up the math :)

@codecov
Copy link

codecov bot commented Dec 26, 2019

Codecov Report

Merging #7160 into master will decrease coverage by 0.16%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #7160      +/-   ##
==========================================
- Coverage   89.88%   89.71%   -0.17%     
==========================================
  Files         450      450              
  Lines       81320    81408      +88     
  Branches    12926    12940      +14     
==========================================
- Hits        73091    73034      -57     
- Misses       5399     5517     +118     
- Partials     2830     2857      +27

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this helps...

@larsoner larsoner changed the title WIP: eLORETA units MRG, DOC: Inverse math Dec 27, 2019
@larsoner
Copy link
Member Author

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a start. Let me know when to have another look. Sorry it took me so long to look.

assert stc.subject == 'sample'
assert stc.data.min() > 0
assert stc.data.max() < 10.0
assert 2 < stc.data.max() < 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you need to update these tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't need to, but it helps during changes to the inverse code to have them be more precise

@larsoner
Copy link
Member Author

@agramfort only bf467a2 is new but I rebased + force-pushed, should have addressed all your comments:

https://18038-1301584-gh.circle-artifacts.com/0/dev/overview/implementation.html#the-minimum-norm-current-estimates

@larsoner larsoner added this to the 0.20 milestone Feb 15, 2020
@larsoner
Copy link
Member Author

FYI I killed Travis because it's going to fail due to failures in master (and was passing last time master was green)

as the whitened measurement vector at time *t*. The spatial
whitening operator :math:`C^{-^1/_2}` is obtained with the help of the
eigenvalue decomposition
:math:`C = U_C \Lambda_C^2 U_C^\top` as :math:`C^{-^1/_2} = \Lambda_C^{-1} U_C^\top`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always found the notation of the whitener C^{-1/2} confusing because it is not really the usual inverse square root of positive definite matrix. If C = U_C \Lambda_C^2 U_C^\top, the usual definition of C^{-1/2} is U_C \Lambda_C^{-1} U_C^\top which is not the whitener. Is there some reason I'm missing for this def ? otherwise we should just name it W

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, but I'd rather sort that notation change out as a separate PR. I'm trying as much as possible to stick to the notation in the existing document, and I suspect that changing this will not be trivial.

@larsoner
Copy link
Member Author

@hichamjanati I pushed a commit to hopefully address your comments with the exception of the C^{-^1/_2} changes, as I think those will require a bit more work to sort out (as a bit of a departure from the existing notation). For example we might want to adopt the "whitener" naming/nomenclature, or we might just want to use the standard definition of C^{-^1/_2}, or we might want to show why it doesn't matter which one you use for our purposes. Which is best will take some thinking and math to sort out...

@larsoner
Copy link
Member Author

I'll go ahead and merge this once CIs are happy.

BTW @hichamjanati feel free to take a shot at the whitener changes if you want (after merge) :)

@larsoner larsoner merged commit eba3087 into mne-tools:master Feb 21, 2020
@larsoner larsoner deleted the eloreta2 branch February 21, 2020 15:30
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* DOC: Cleaner equations

* DOC: Wording
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* DOC: Cleaner equations

* DOC: Wording
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.

3 participants