Repository navigation
MRG+1: Unit-gain LCMV beamformer - #6213
Conversation
|
+100 from me on this! |
| reject = dict(grad=4000e-13, mag=4e-12) | ||
|
|
||
| # where FieldTrip data should be saved to / imported from | ||
| ft_data_path = ' ' |
There was a problem hiding this comment.
I would make it MNE-testing-data/fieldtrip/*
| assert pearson[0, 1] >= 0.99 | ||
|
|
||
|
|
||
| test_lcmv_fieldtrip() |
There was a problem hiding this comment.
Is it right that this needs to be changed in run_tests_if_main() ? Do I have to add the test somewhere for it to work?
There was a problem hiding this comment.
Don't call the test manually, let pytest mne/... do it. run_tests_if_main() in theory should do this if you run the file as a script but in practice this mode is currently broken for many tests. So feel free to add run_tests_if_main to the bottom for future compat
Codecov Report
@@ Coverage Diff @@
## master #6213 +/- ##
==========================================
+ Coverage 87.28% 89.08% +1.79%
==========================================
Files 413 414 +1
Lines 74503 74604 +101
Branches 12296 12318 +22
==========================================
+ Hits 65030 66460 +1430
+ Misses 6600 5247 -1353
- Partials 2873 2897 +24 |
|
I'll push a commit to fix the tests unless you're working on it now |
|
Thanks for the tests, @larsoner ! Just fixed the beamformer name in |
|
@britta-wstnr don't worry about changing the conditional for |
|
I also made sure now that the ill-defined combination |
|
Good to go from your end? The renaming of |
|
Ahh I saw the change at the project end, so have retitled accordingly |
|
Yes, I think I am done here, let's hope we come back green! |
|
MEG+1 from me. |
|
Thanks @britta-wstnr ! |
This fixes the pseudo-inversion in the filter computation.
In the old code, the
pinvhad an arbitraycond=0.1set. We already stumbled across this in the past several times (the code is from before we started the overhaul of the module). So far we kept it, since we had no good motivation to change it.Now, I ran our beamformer against FieldTrip, and if I get rid of this threshold
cond=0.1, the variance explained between the toolboxes for the beamformer output jumps from 0% to 100% and the output gets much more plausible than before.After investigating this, I would consider the old code a bug.
Of course, we'd have to change the value ranges for the unit tests now ...
Thoughts? @larsoner @agramfort @wmvanvliet
Edit: I added the FieldTrip comparisons here as well - closes #6183