Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mne prewhiten #1544

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

mne prewhiten #1544

wants to merge 5 commits into from

Conversation

schoffelen
Copy link
Contributor

This is a PR that eventually should address #1473.

@schoffelen
Copy link
Contributor Author

The first step is to inventorize for ft_inverse_mne, whether the 'prewhiten' option behaves the same as a call to ft_denoise_prewhiten, followed by ft_sourceanalysis

@schoffelen schoffelen linked an issue Sep 11, 2020 that may be closed by this pull request
@schoffelen schoffelen added this to In progress in source modeling via automation Sep 11, 2020
@schoffelen
Copy link
Contributor Author

Currently, the test function checks whether ft_sourceanalysis (with 'mne'+'prewhiten') results in the same output as a sequential call to ft_denoise_prewhiten/ft_sourceanalysis (with 'mne' + 'prewhiten'/'no-prewhiten').
With prewhitened data in the input (i.e. an eye(nchan) noise cov matrix), AND cfg.mne.prewhiten = 'yes', the results are the same.

With prewhitened data in the input AND cfg.mne.prewhiten = 'no', the results will only be the same IF cfg.mne.lambda is square rooted :(. this is the consequence of the fact that the estimation of the inverse operator in ft_inverse_mne applies a different formula, and is incosistent in its treatment of lambda (squared vs. non-squared). See #1307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
source modeling
  
In progress
Development

Successfully merging this pull request may close these issues.

make the prewhitening consistent across the codebase
1 participant