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

BUG: Fix bug with CSP rank

Open larsoner opened this issue 1 year ago • 0 comments

Closes #9094

WIP because I haven't thoroughly tested or anything. But at least modifying the example things work out of the box. The "trick" is to use _smart_eigh to figure out the correct subspace, do the eigh(a, b) in that subspace, and project back the same way we do with covariances. (Now you shouldn't even have to supply rank because it'll compute it from the cov for you if you don't!)

This really only works with a single channel type at the moment -- to properly support multiple channel types people should pass an info I think. So the TODO list is roughly:

  • [x] Make tests more thorough
  • [x] Make sure everything is green
  • [ ] Add info support to make multiple channel types support robust
  • [ ] Add a test using MEG+EEG to make sure it works
  • [ ] Add an example using MEG+EEG

larsoner avatar Mar 01 '24 23:03 larsoner