mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

Evoked.plot_field() should default to calculating the surface maps on-the-fly

Open hoechenberger opened this issue 2 years ago • 1 comments

Currently, Evoked.plot_field() has a required paramter, surf_maps, which need to be constructed by calling make_field_map().

I don't like this two-step approach; can we make it such that surf_maps can become optional (default to None), and if it's not provided, we call make_field_map() automatically? We'd need to add a few additional parameters then, too, but we don't need to expose everything make_field_map() can do – adding trans, subject, subjects_dir, and picking some sane defaults for the rest should be sufficient.

WDYT?

hoechenberger avatar Jun 19 '22 19:06 hoechenberger

Sure we could support surf_maps=None with these other parameters I guess. I think it's done this way because it can be a bit slow and you might want to reuse the surf maps for multiple Evokeds, but we can support the one-liner use case, too, I think

larsoner avatar Jun 19 '22 22:06 larsoner