Describe the new feature or enhancement
In mne-denoise.DSS.linear, we need cov matrices for baseline and biased sensor covariance matrices from Evoked objects (mne-tools/mne-denoise#39). Now DSS falls back to numpy, but we want to make use of mne-python functions. One option could be an adapter we host in mne-denoise (mne-tools/mne-denoise#42). A cleaner implementation would be to work through mne.compute_covariance. @larsoner was already positive for this change (mne-tools/mne-denoise#42 (comment)).
Describe your proposed implementation
The change is minimal. We accept Evoked through existing epochs argument and reject keep_sample_mean=False. With Evoked data we treat samples will be treated as observations and channels as variables: spatial covariance over time, not an estimate of trial-to-trial noise covariance. I already have an implementation in my fork but I want to get confirmation for API before opening the PR. I also removed duplicate _unpack_epochs code and changed the function to _unpack_covariance_input.
Describe possible alternatives
- as an alternative we can wrap Evoked in Epoch object.
- for arguments we accept inst (for instance instead of epochs) but this will require 2-3 releases and some backward compatibility maintenance.
Additional context
No response
Describe the new feature or enhancement
In
mne-denoise.DSS.linear, we need cov matrices for baseline and biased sensor covariance matrices fromEvokedobjects (mne-tools/mne-denoise#39). Now DSS falls back to numpy, but we want to make use of mne-python functions. One option could be an adapter we host in mne-denoise (mne-tools/mne-denoise#42). A cleaner implementation would be to work through mne.compute_covariance. @larsoner was already positive for this change (mne-tools/mne-denoise#42 (comment)).Describe your proposed implementation
The change is minimal. We accept Evoked through existing
epochsargument and rejectkeep_sample_mean=False. With Evoked data we treat samples will be treated as observations and channels as variables: spatial covariance over time, not an estimate of trial-to-trial noise covariance. I already have an implementation in my fork but I want to get confirmation for API before opening the PR. I also removed duplicate _unpack_epochs code and changed the function to _unpack_covariance_input.Describe possible alternatives
Additional context
No response