Closed drammock closed 6 years ago
+1
PR welcome
We could make things like surfaces='sample-head-dense'
would work by looking for .surf
and .fif
extensions, and loading the surface or BEM surface, respectively. WDYT?
I would use head-dense.
cf doc:
surfaces : str | list
Surfaces to plot. Supported values: ‘head’, ‘outer_skin’, ‘outer_skull’, ‘inner_skull’, ‘brain’, ‘pial’, ‘white’, ‘inflated’. Defaults to (‘head’,).
That's doable but a departure from what is done now. The existing logic actually assumes 1) you've given something like the entire filename as it is in $SUBJECTS_DIR/$SUBJECT/bem/
, and 2) you're loading a .surf
file (or one of the surfaces in your already-loaded bem
). So in cases where people had sample-head-dense.fif
, it wouldn't load even if supplied head-dense.fif
because it doesn't prepend the sample-
at the beginning. We could add this prepending behavior (as well as the ability to also look for and load .fif
) -- is that what you're thinking?
It looks like the existing code also doesn't check to see that all surfaces supplied were found (so surfaces='foo'
) won't raise an error) so we should fix that while we're at it.
sample-head-dense.fif is a standard name. I think we can guess it.
+1 for the fix
There does not appear to be a way to specify whether to use the sparse or dense head in
mne.viz.plot_alignment
. According to @larsoner this used to be possible with the now-deprecatedplot_trans
function. Requesting an enhancement to allow this viaplot_alignment
.The loading of the head surface is handled here so presumably that's where code to allow user-specified surface density would get plugged in.