MRG: Remove unused argument and refactor#5140
Merged
larsoner merged 2 commits intomne-tools:masterfrom Apr 18, 2018
Merged
Conversation
Member
Author
|
@jona-sassenhagen do you have time to take a look? |
6 tasks
agramfort
approved these changes
Apr 17, 2018
Codecov Report
@@ Coverage Diff @@
## master #5140 +/- ##
==========================================
+ Coverage 88.14% 88.17% +0.02%
==========================================
Files 357 358 +1
Lines 65777 65902 +125
Branches 11192 11208 +16
==========================================
+ Hits 57982 58111 +129
+ Misses 4958 4956 -2
+ Partials 2837 2835 -2 |
larsoner
commented
Apr 17, 2018
| vmin_, vmax_ = _setup_vmin_vmax(data_, None, None) | ||
| plot_topomap(data_.flatten(), pos, vmin=vmin_, vmax=vmax_, | ||
| res=64, axes=ax, cmap=cmap, outlines=outlines, | ||
| contours=contours, show=False, image_interp='bilinear')[0] |
Member
Author
There was a problem hiding this comment.
This is verbatim copy-paste except for the removal of image_mask=None here
Contributor
|
So it seems it was originally used for this: Hm. I guess I approve. |
Member
Author
|
Ahh. If you are using the default ( |
Contributor
|
LGTM |
agramfort
approved these changes
Apr 18, 2018
britta-wstnr
pushed a commit
to britta-wstnr/mne-python
that referenced
this pull request
Jul 5, 2018
* FIX: Remove unused argument and refactor * FIX: Move _plot_corrmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think we have some code path cruft that has built up in
mne/viz/topomap.py.image_maskis never used to modify the plots, so I removed it._make_image_maskboth set up the (unused)image_maskand modifiedposbased onautoshrink, so I renamed it to_autoshrink.outlinesgets set by_check_outlinesto always be a dict. So I removed the conditionals having to do withif outlines is Nonethat happen afterward._plot_corrmaptomne/viz/topomap.pyto keep plotting code inmne/vizThis is a step toward #5085. Simplifying this first and getting feedback should make the subsequent steps easier.