We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I played around with dt of the stimulus and realized that the number of spikes in the standard HH model depends on the stepsize. Code to reproduce:
from neurax.channels import HHChannel # Number of segments per branch. nseg_per_branch = 1 comp = nx.Compartment() branch = nx.Branch([comp for _ in range(nseg_per_branch)]) # point neuron: cell = nx.Cell([branch for _ in range(1)], parents=jnp.asarray([-1])) cell.insert(HH()) # Stimulus. i_delay = 20.0 # ms i_amp = 3.7 # nA 0.08 i_dur = 20.0 # ms # Duration and step size. dt = 0.0025 # ms # Changing dt here, changes the HH solution t_max = 60.0 # ms time_vec: jnp.Array = jnp.arange(0.0, t_max+dt, dt) stim: jnp.Array = jx.step_current(i_delay, i_dur, i_amp, dt, t_max) cell.branch(0).comp(0).stimulate(stim) # Solve HH s = nx.integrate(cell)
Am I doing something wrong here? Or is there a bug in the solver?
The text was updated successfully, but these errors were encountered:
Passing dt to the solver fixes the issue:
dt
s = nx.integrate(cell, stims, recs, delta_t=dt)
Sorry, something went wrong.
To make this behavior clear, we could do:
stim, t = jx.step_current(i_delay, i_dur, i_amp, dt, t_max) cell.branch(0).comp(0).stimulate(stim, t) v = jx.integrate(cell)[:, 1:] # To make `t` and `v` equally long. plot(t, v)
This has the advantage that stim and t can both be arrays, which makes handling this very intuitive. @jnsbck @huangziwei @kyralianaka
stim
t
No branches or pull requests
I played around with dt of the stimulus and realized that the number of spikes in the standard HH model depends on the stepsize.
Code to reproduce:
Am I doing something wrong here?
Or is there a bug in the solver?
The text was updated successfully, but these errors were encountered: