You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
question: puzzling results in epochs.plot_topo_image #6112
@jona-sassenhagen it looks like _plot_masked_image (and its proposed public version) require/create an axes object each time called, whereas plot_topo_image_epochs does the _iter_topography thing to plot each little imagmap inside one big axes. So changing plot_topo_image_epochs to use _plot_masked_image behind the scenes might take some heavy lifting.
(as an aside, I noticed that _plot_masked_image has a picks argument that appears to go unused?)
ah, you're right @jona-sassenhagen. I thought it was passing unified=True by default, but that must have been something else I was looking at yesterday.
I'm gonna punt on this one until the sprint, I think. I put in a draft PR for what I think should be happening, but the resulting plots don't look right (too much of the signal lands near zero => images are mostly grey/white). I also considered an approach using np.quantile to set vmin/vmax at the (0.01, 0.99) quantiles to pull some color into the middle range... maybe worth exploring?
Activity
larsoner commentedon Apr 2, 2019
Looks like a scaling / vmiv / vmax problem in the first example
drammock commentedon Apr 2, 2019
So, not intentional I take it. I'll have a look.
jona-sassenhagen commentedon Apr 2, 2019
For the purpose of DRY, this could default to #6078 ...
drammock commentedon Apr 2, 2019
@jona-sassenhagen it looks like
_plot_masked_image(and its proposed public version) require/create an axes object each time called, whereasplot_topo_image_epochsdoes the_iter_topographything to plot each little imagmap inside one big axes. So changingplot_topo_image_epochsto use_plot_masked_imagebehind the scenes might take some heavy lifting.(as an aside, I noticed that
_plot_masked_imagehas apicksargument that appears to go unused?)jona-sassenhagen commentedon Apr 2, 2019
Hm? iter_topography creates one axis per sensor, right?
mne-python/mne/viz/topo.py
Line 214 in 9b5ae51
So this would essentially be about changing the show_func mostly, right?
Not saying it is trivial.
Either way, the same applies to #4746, which I will do during the sprint.
drammock commentedon Apr 2, 2019
ah, you're right @jona-sassenhagen. I thought it was passing
unified=Trueby default, but that must have been something else I was looking at yesterday.drammock commentedon Apr 2, 2019
@larsoner I'm convinced that in fact both of the plots above have messed up vmin/vmax. Compare the detail plots:
versus clicking on that channel after
versus clicking on that channel after
Still working out how to correct it.
jona-sassenhagen commentedon Apr 2, 2019
I remember fixing a lot of code in epochs.plot_image to get the vlims right. Maybe check there.
Or I could indeed try to hook this up to _plot_masked_image at the sprint, so it could simply share that vlim functionality.
WIP: fixes mne-tools#6112 ?
drammock commentedon Apr 3, 2019
I'm gonna punt on this one until the sprint, I think. I put in a draft PR for what I think should be happening, but the resulting plots don't look right (too much of the signal lands near zero => images are mostly grey/white). I also considered an approach using
np.quantileto set vmin/vmax at the (0.01, 0.99) quantiles to pull some color into the middle range... maybe worth exploring?mmagnuski commentedon Apr 3, 2019
I've had this problem too some time ago, but now I rarely use
plot_topo_image.jona-sassenhagen commentedon Apr 23, 2019
Mayyyyybe with #6186 in we can use _set_image_lims_and_scale for this.