-
Notifications
You must be signed in to change notification settings - Fork 5
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
kESI experiments on 4 spheres models #20
Comments
Interesting problem: Electrode Fp2_L2 - deep in the brain, correction field: Fp2_L1 - shallow in the brain Fp2 - 1 mm in the scalp tissue: The solution is spherically symmetrical almost perfectly! If you play with colors and contrast you can BARELY see a border: This could explain why 10-20 scalp electrode kCSD and kESI solutions are basically identical! Need to check the potential... |
trying different electrode depths 4 spheres model, 0.005 max element size Correction (v_kesi - v_kcsd) Seems like electrode position in respect of mesh vertices matters a lot for the correction. I guess this is the singularity problem But also, I think there is not enough accuracy in the mesh around electrodes. Feel like the best way to solve it is to use MFEM dynamic refinement, or add real, physical electrodes as mesh elements. |
Using scalp electrodes at 88mm close to the internal layer of the mesh, creates "better" correction: But the kESI Eigensources and solution is still almost exactly the same as kCSD, except of some small differences. My guess it's because we increased the accuracy of local sampling around electrode, but the long reaching "visibility" stays the same. |
Should come back to this after solving image-to-mesh problem and trying out on some realistic meshes. |
Trying to solve 3 layered 10-05 system, kCSD and kESI eigensources still look pretty much identical. 10-05_layers_eigenvectors.webmSolutions (ground truth is overlaid) of 4 spheres with a dipole, red circles are electrodes: kESI: kCSD: kESI - kCSD: The difference exists, it doesn't seem to be a numerical noise, but CSD solution is on a scale between [-4000; 4000] units, and the difference is between [-0.005; 0.005] units, so it's basically a few parts per million, and is mostly around the ground truth and borders. So the kESI might influence the solution a bit, in this spherical case. potential: Maybe 3 spheres with these electrodes is just too symmetrical? Maybe worth trying on a realistic model?? |
After some refactor of signal generator, implementing very basic point dipole, some testing of forward modelling using MFEM in 4 spheres model: DipolesSphere radii in meters: brain, csf, skull, scalp: 0.079, 0.082, 0.086, 0.09 Slice along Z axis at X, Y = (0, 0) point_dip_mfem_4sph
gauss_dip_mfem_4sph
gausss_dip_kcsd.nii.gz
MonopolesSlice along Z axis at X, Y = (0, 0) gauss_mon_kcsd
gauss_mon_mfem_4sph
point_mon_mfem_4sph
Point Dipole MFEM vs Analytical 4 sphere modelHorizontalHigher contrast: VerticalSlicepoint_dipole_mfem_4sph Something is weird with how layers react??
point_dipole_anal_4sph
3D viewHigher contrast |
Small experiments with dipoles4 spheres dipoles, real spheresSphere radii in meters: brain, csf, skull, scalp: 0.079, 0.082, 0.086, 0.09 Slice along Z axis at X, Y = (0, 0) point dipol 4 spheres analytic vs point dipole free space vs point dipole mfem 4 spheres 4 spheres dipoles, shperes set to homogeneousSphere radii in meters: brain, csf, skull, scalp: 0.079, 0.082, 0.086, 0.09 Point source, 4 spheres homogeneus + optional last element as airSphere radii in meters: brain, csf, skull, scalp: 0.079, 0.082, 0.086, 0.09 kCSD - free space solution (had to rescale it x10 for some reason... something with normalisation??? It's correct for point sources when calculating electrodes...) Something doesn't work... sigma 3.0 kCSD fits sigma 0.33 MFEM, sigma 0.3 kCSD fits 3.0 MFEM?? |
MFEM problem with conductances parameter
Point source solutions As we can see, potential shrinks when conductance increases Current MFEM solution is opposite! Similar with dipoles: kCSD point dipole: Analytical point dipole: kESI point dipole: Conductance relationship is reversed! 4 Sphere solution vs kCSD solution also have some differences, on the edge of the spheres and just above the defined depth Overall: 4 shpere edge: Intermediate part has good corcondance with free space dipole: |
|
TODO: |
Todo:
From #17 we now have forward solver for point sources - electrodes and arbitrary meshes. But it seems to work correctly only for 4 spheres meshes in vaccuum
scalp electrodes are weird!!!
need to try with higher resolution meshes, deeper scalp electrodes, scalp electrodes have wrong correction...
might need to do local mesh refinement, or add real electrodes in the mesh. That will not change long range interactions... Most likely spherical symmetricity of the 4 spheres scalp electrodes is just homogeneous enough to be kCSD solveable...
Check how exactly leadfield correction is used, should it really be the difference between analytic and FEM solution? Or was it all just a FEM solver trick to soften singularities.
looking at the
solve_sphere_on_plate.py
and it's imports it seems the correction potential saved by the FeNiCs solver is u - u_inf, which is exactly what I'm doing in MFEM.Check for analytical 4 spheres solution? Calculate leadfields using analytical model? Useful link https://github.com/Neuroinflab/fourspheremodel
kESI project has a working version for point dipoles only, can't compare with electrodes, and can only sample the potential "above" the dipole position...
compare dipole solution analytical/numerical
in numerical I cannot really create a point dipole, only a dipole with some existing size, unless maybe I try implementing my own point Dipole based on DeltaCoefficient??? 2 super close delta coeffs!
experiment with multilayered depth 10-05 electrodes on four spheres
had to optimise solution storing, and need to fix scalp electrodes
https://github.com/Neuroinflab/kESI/tree/dev/20_experiments_with_4_spheres
The text was updated successfully, but these errors were encountered: