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

Interpolation tables affecting accuracy #486

Open
subhacom opened this issue Sep 3, 2024 · 0 comments
Open

Interpolation tables affecting accuracy #486

subhacom opened this issue Sep 3, 2024 · 0 comments

Comments

@subhacom
Copy link
Collaborator

subhacom commented Sep 3, 2024

Current implementation of HHGate and HHGate2D enforces interpolation tables for obtaining the steady-state values of the parameters for gate dynamics (m_inf, m_tau, etc.).
However, this can produce numerical inaccuracies depending on the formula for the state variable. For example, in Maex and deSchutter 1998, the KC channel depends on both voltage and [Ca2+]. The equations are more sensitive to [Ca2+].
The default 3000 divisions for the Ca2+ dimension of the 2D interpolation tables produces quite a bit of error compared to other simulators directly evaluating the formula.
Changing this to 10000 improves the results, but not good enough. When the cell spikes, soon the interpolation based implementation goes out of sync with exact evaluation.
[Ca2+] with 3000 divisions, only CaHVA, KCa (KC), CaPool, and leak conductance are present
Gran98_LEMS_MOOSE_capool_20240903_3000divs

[Ca2+] with 10000 divisions:
Gran98_LEMS_MOOSE_capool_20240903_10000divs

  1. A switch to go between lookup tables and exact evaluation may help such cases.
  2. In addition, the minimum and maximum values now depend on what the user decides/some reasonable defaults. However, for formulae are agnostic of realistic ranges. This results in hard to find bugs in simulation (the Maex and de Schutter 98 model is an example, where the [Ca2+] can hit 5 mM, and I was originally setting the upper limit to 2 mM). It will help to provide a warning message for the user whenever the boundaries of the interpolation table are hit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant