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

[ENH] Flexible choice of cluster size #970

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

johaenns
Copy link
Contributor

Added functionality to allow for a flexible choice of the cluster size of the clustered forward solution. Before the cluster size was hard-coded.

Furthermore fixed a small bug which would lead to crashes due to a segfault:

Deleting the QSharedDataPointer in compute_fwd.cpp causes a segfault when later dereferencing *m_eeg_forward_grad.data()/*m_meg_forward_grad.data() in the call of compute_forward_eeg/compute_forward_meg.

There might be a way to fix this while still deleting the (basically empty) object behind the shared pointer. However, as far as I can see we do not have a guarantee that the value of m_pSettings->compute_grad does not change, so if it would switch to true later on and for some reason calculatedFwd() gets called we would have a problem with the current code anyway.

@LorenzE
Copy link
Member

LorenzE commented Apr 30, 2024

LGTM thanks @johaenns

@LorenzE LorenzE merged commit 16a9381 into mne-tools:main Apr 30, 2024
13 checks passed
@juangpc
Copy link
Collaborator

juangpc commented May 7, 2024

Thanks both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants