-
Notifications
You must be signed in to change notification settings - Fork 712
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
error with dipole scan + EEG precomputed leadfield #2188
Comments
after discussing it with @schoffelen, I will make some changes in my local fork and see if I can fix it locally. |
I do not know how to change the label btw |
Indeed, just to add some info: Yet, irrespective of whether cfg.nonlinear was yes or no, the final solution will be computed by a call to ft_compute_leadfield, given the optimal dipole parameters. This is impractical in the context of a FEM headmodel, since it will require a lengthy re-computation. Hence MC's workaround to add an empty headmodel to ft_dipolefitting. This - in the context of EEG - leads to a low-level error, since an infinite volume conductor for EEG expects a conductivitiy to be specified. The idea thus is to add to the (intermediate) dip structure the (possibly already precomputed) leadfield corresponding to the optimal solution during the gridsearch, which allows a bypass of the re-computation of the leadfield in the final part of the code. Clearly, the leadfield corresponding to the optimal grid point(s) will need to be removed if cfg.nonlinear = 'yes'. |
I created a pull request #2339 |
hi, I have been trying to compute a dipole scan with an EEG pre-computed leadfield and timelocked data.
This is the code I used for the dipole scan:
where avg,elec,lf_787 are the timelocked data, elec file and leadfield for dataset 787, resp.
The error:
is given by the fact that after identifying the dipole with minimum error (ft_dipolefitting line 497), the leadfield is computed again in ft_dipolefitting line 578, where the headmodel is assigned to be "infinite", instead of retrieving the leadfield that is already computed.
The text was updated successfully, but these errors were encountered: