Closed alexrockhill closed 7 months ago
cc @adam2392 @larsoner
Also when I use that to do stc.plot_3d
it works the first time and then gets killed the second identical time it's called so I think there might be a memory leak but that's totally separate and probably an issue with mne.viz.Brain
.
Yeah once it's picked you shouldn't use picks
anymore so safest to del picks
and just use frames = set(ch["coord_frame"] for ch in evoked.info["chs"])
Description of the problem
Trying to use
stc_near_sensors
there is one bug if there are any bad channels, that causesThis to fail with an index error because when
evoked
gets picked the bad channels aren't included.There is another bug/API confusion that the default for
surface
is'pial'
so if you pass a volume source estimate and no argument forsurface
then you get an index error because it tried to use the pial surface which has the wrong indices for your volume source estimate. That seems unnecessarily confusing, I think it should work reasonably with default arguments for both surface and volume source estimates.Also while doing a MWE, this link in the issue template is broken https://mne.tools/dev/overview/datasets_index.html.
Steps to reproduce
Link to data
No response
Expected results
Working stc
Actual results
Two index errors
Additional information
None