kymata-atlas / kymata-core

Core Kymata codebase, including statistical analysis and plotting tools
https://kymata.org
MIT License
5 stars 0 forks source link

Bugfix: mismatched dimensions error when running gridsearch #301

Closed caiw closed 2 months ago

caiw commented 2 months ago

Haha, that was DOOZY!

The inverse solutions had some bad EEG channels removed, whereas the trialwise data didn't. When using mne.minimum_norm.apply_inverse the extra data channels are silently dropped. When using the new faster code introduced in #276, the first time the code was run, it would drop the channels and save the combined inverse solution. The second time the code was run, it would load the combined inverse solution and then attempt to matrix-multiply without first dropping the mismatched channels. So it worked in our tests using the first codepath but then didn't work in production when the second codepath was taken 😅

Now fixed.

Fixes #300 Addresses #302 but arguably does not fix it enough