Repository navigation
Plot image public - #6078
Plot image public#6078jona-sassenhagen wants to merge 5 commits into
Conversation
|
Keynote coding! |
Codecov Report
@@ Coverage Diff @@
## master #6078 +/- ##
==========================================
- Coverage 88.98% 87.35% -1.64%
==========================================
Files 402 402
Lines 73171 73182 +11
Branches 12156 12159 +3
==========================================
- Hits 65112 63925 -1187
- Misses 5184 6411 +1227
+ Partials 2875 2846 -29 |
|
An issue I came across here (and what makes the tests fail) is that we currently allow images with only one row (i.e., single-channel). Which is better:
|
|
Personally I prefer to advertise matplotlib here. We cannot reinvent everything. |
|
The motivation is that good masked and/or contoured images require non-trivial code, see Line 2660 in 4e1f063 |
|
is this needed for this example?
|
|
No, it only somewhat simplifies the example. We could use it for an example where we threshold a GAT matrix by statistical significance though, which would become much easier with this. I can draft something like this - maybe as a tutorial under the stats section. |
| # imshow for linear because the y ticks are nicer | ||
| # and the masked areas look better | ||
| extent = [times[0], times[-1], yvals[0], yvals[-1] + 1] | ||
| top_bound = yvals[-1] + (yvals[-1] - yvals[-2]) |
There was a problem hiding this comment.
This will break if there are not at least two entries in yvals (and same below for times), the old code would not.
Granted, the old code would throw a mpl warning about not being able to set the bounds properly (or at least set_xlim and set_ylim do), but this code will throw an error, and it probably shouldn't. It should be acceptable to show an image with a single row (or col).
|
it simplifies if you are an MNE expert and it's harder to read if you know
matplotlib.
I am still -0.5 on this
|
|
As an MNE user who usually bugs @jona-sassenhagen with lots of questions Id really like to see this implemented. I've bee using the GAT functions a lot recently and have been looking for an easy way of masking significance |
|
I honestly think the np.kron thing we do here (either @cbrnr or @mmagnuski did this IIRC? or maybe Chris) is hard to figure out by yourself. Everyone can ax.imshow, but the contour and masking and ... is harder! |
|
IIRC you added the |
|
I just had to google |
|
ok let's say I am +0 to make this function public. Where do you expose this to users in the doc? |
One option would be to add a section on statistics for GAT. |
|
by bootstrapping epochs? as we don't have multiple subjects...
… |
|
Yes, maybe on the KWord dataset with its 960 epochs ... Actually, do we really not have any inference on decoding? |
|
I would do manually permutations or bootstrap. I don't think we have
anything buitin.
… |
|
Yeah probably not gonna implement this after all unless there is demand :) |
TBD: Docstring, figure out what that weird
yvals[-1] + 1is for.Closes #5952