-
Notifications
You must be signed in to change notification settings - Fork 67
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
STC saturated – rank problem? #905
Comments
Yes it's probably a rank mismatch between the A long-term plan for at least some of this stuff could come out of mne-tools/mne-python#4676, but even with that I don't think we're guaranteed to solve all issues. I've been meaning to add something that allows computing the rank robustly from the epochs of interest -- in my work with infants who move a lot I almost always use something like:
and it has worked well. I propose we add something like:
where the backward-compatible
and then this would compute the rank from |
thanks for the fast reply @larsoner! in my own code I did the following to prevent the problem:
|
Ahh yes in principle you should probably compute the rank over whatever you're using to compute the covariance. So it should be computed in the |
@larsoner it seems already the case that one can chose the file from which to read the info in source/05_make_inverse.py After setting source_info_path_update in config, my stcs look fine.
Is this the intended usage? |
Yeah it seems like that would make sense. Not sure what the current behavior / default is for source_info_path_update is, seems like it should use the |
It reads the Info from the Evoked |
I agree. I couldn't figure out what the default behavior does. |
So the solution would be to NOT use the Info from the Evoked if the noise cov was estimated from empty-room or resting-state data, do I understand this correctly? |
yes, I think this is what causes the mismatch in ranks and the weird stcs |
@hoechenberger if you can point me to where this happens, I can try to change it |
Sorry, I can't give any useful advice for now, as I'm busy with other stuff … maybe by the end of the week, but I cannot promise anything! |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Larson <[email protected]>
* upstream/main: change default for info to use for inverse mne-tools#905 (mne-tools#919) Improve documentation and config validation of `loose` and `depth` parameters; drop support for `loose=None` (mne-tools#915) enhance documentation of caching, continuation of mne-tools#914 (mne-tools#918) [pre-commit.ci] pre-commit autoupdate (mne-tools#917) Restructure configuration options documentation sections (mne-tools#914) Try to fix documentation deployment (mne-tools#913) Do not show `Annotated` types in configuration options documentation (mne-tools#911) Add number of subjects to grand-average report (cont'd) (mne-tools#910) MAINT: Ensure input changes cause output changes (mne-tools#904) Render type annotations in the documentation again (mne-tools#909)
I am not happy with the stcs of some of my subjects, they look like the screenshot attached: at one moment in time there is very high activity everywhere, which messes up the scale. I remember that a similar outcome was caused by differences in rank between the cov used for whitening, and the rank given to compute the inverse.
With cfg.noise_cov = 'rest', the following should read the info of the resting state run to compute the inverse.
l. 52 in source/_05_make_inverse.py
in_files["info"] = bids_path.copy().update(**cfg.source_info_path_update)
I cannot figure out what the **cfg.source_info_path_update does.
Thanks for any help!
The text was updated successfully, but these errors were encountered: