Closed larsoner closed 1 year ago
maybe something like: https://gist.github.com/jasmainak/756cf02dce82ab2dc5c2c69722dd13d1
Also as suggested by @jjnurminen _map_meg_channels
could also use multipole moments instead of minimum norm. I think ideally one should be able to use either transformation approach (minimum norm or multipole moments) in both maxwell_filter
and in whatever ends up being the public version of _map_meg_channels
.
See also https://github.com/mne-tools/mne-python/pull/4491 where @kingjr wanted things to be faster -- the multipole moment method could end up being faster, but either way we can tackle speed as part of this issue.
I think we have this sort of thing with https://github.com/mne-tools/mne-python/pull/7366 and epochs/evoked.as_type
FWIW the transformation is linear so if you want it to be really fast, do it once with an EvokedArray(np.eye(info["nchan"]), info)
or so and then do the matmul
to data as needed
The
map_data
functions should become public somehow for mapping data between runs.I think we can do it pretty easily actually by incorporating it into
maxwell_filter
(you get many things for free this way) but Alex does not like it yet. For discussion at the sprint.Todo:
maxwell_filter
to use a minimum norm approach_map_meg_channels
public_map_meg_channels
to use multipole moments instead of minimum norm