Skip to content

Fix : simulate evoked with different sensor types + take into account… - #5940

Merged
agramfort merged 7 commits into
mne-tools:masterfrom
agramfort:projs_sim_evoked
Feb 15, 2019
Merged

agramfort merged 7 commits into
mne-tools:masterfrom
agramfort:projs_sim_evoked

Conversation

@agramfort

Copy link
Copy Markdown
Member

this fixes 2 problems:

  • simulate evoked with different sensor types. Symptom was not the noise was not scaled properly for mags. Noise was too strong.
  • take into account projs from the cov to make sure that the noise and the signal belong to the same subspace.

thanks @QB3 for the bug report.

Comment thread mne/simulation/evoked.py Resolved
@codecov

codecov Bot commented Feb 14, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #5940 into master will decrease coverage by 1.82%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #5940      +/-   ##
==========================================
- Coverage   88.77%   86.94%   -1.83%     
==========================================
  Files         401      401              
  Lines       72440    72464      +24     
  Branches    12124    12125       +1     
==========================================
- Hits        64305    63002    -1303     
- Misses       5210     6584    +1374     
+ Partials     2925     2878      -47

massich
massich previously approved these changes Feb 14, 2019

@massich massich left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, I guess that the math checks out (thx @QB3)

ajajajaja, but travis disagree

@massich

massich commented Feb 14, 2019 •

Copy link
Copy Markdown
Contributor

@QB3 this guy is faling

def test_rap_music_simulated():

run:

pytest mne/beamformer/tests/test_rap_music.py -k test_rap_music_simulated

and if you run this before it will stop where ever it had an error:

export PYTEST_ADDOPTS='--pdb --pdbcls=IPython.terminal.debugger:TerminalPdb --capture no'

then if you whant to stop being blocked by the debugger you can always unset the varaible like this:

unset PYTEST_ADDOPTS

(happy debugging)

@QB3

QB3 commented Feb 14, 2019

Copy link
Copy Markdown
Contributor

I will check this this evening

@massich
massich dismissed their stale review February 14, 2019 14:51

travis is faling

@larsoner

Copy link
Copy Markdown
Member

Pushed the fix suggested earlier

@larsoner

Copy link
Copy Markdown
Member

@agramfort suggested fix pushed, see simpler more unified code + new test that would have failed with the not-positive-semidef error

@larsoner

Copy link
Copy Markdown
Member

... and reverted a now-unnecessary residual tolerance change in test_dipole.py

@larsoner larsoner mentioned this pull request Feb 15, 2019
6 tasks done
@agramfort
agramfort merged commit 0656d8e into mne-tools:master Feb 15, 2019
@agramfort

Copy link
Copy Markdown
Member Author

thx heaps @larsoner for finishing this one !

@QB3 you can know switch back to MNE master for your experiments.

@larsoner
larsoner deleted the projs_sim_evoked branch February 15, 2019 20:49
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.

4 participants