Calcium channel can lead to NaN #5
Answered
by
huangziwei
michaeldeistler
asked this question in
Q&A
-
I found that, if only a calcium channel is inserted, then the simulation can fail. import matplotlib.pyplot as plt
import jaxley as jx
from jaxley_mech.channels.fm97 import Ca
# If decreased below 0.0001 the simulation will succeed.
i_amp = 0.001
dt = 0.025
t_max = 200.0
i_delay = 1.0
i_dur = 20.0
comp = jx.Compartment()
comp.insert(Ca())
comp.record()
comp.stimulate(jx.step_current(i_delay, i_dur, i_amp, dt, t_max))
v = jx.integrate(comp)
fig, ax = plt.subplots(1, 1, figsize=(5, 3))
_ = ax.plot(v.T)
_ = ax.set_ylim([-80, 150]) Do you know if this is a bug or if this is just how the differential equation for calcium is set up? |
Beta Was this translation helpful? Give feedback.
Answered by
huangziwei
Jan 29, 2024
Replies: 1 comment
-
likely a bug, I will check it tomorrow. UPDATE: @michaeldeistler It's a bug. Ca concentration in the compartment went negative, which shouldn't happen... fixed in the latest commit. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
huangziwei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
likely a bug, I will check it tomorrow.
UPDATE:
@michaeldeistler It's a bug. Ca concentration in the compartment went negative, which shouldn't happen... fixed in the latest commit.