braincell.quad.staggered_step#
- braincell.quad.staggered_step(target, *args)#
Advance a multi-compartment cell by one staggered time step.
The staggered (operator-splitting) scheme separates the membrane voltage update from the ion-channel gating-variable update so that each sub-system can use the integrator best suited to it. Within a single time step
dt:When required by an ion model, its total source current is cached at the old voltage before any state advances.
The cable voltage is advanced with a locally linearized implicit Euler step solved on the node-tree by
dhs_voltage_step()(the dendritic hierarchical solver, DHS). The axial block is implicit, so it is not subject to the corresponding explicit-stability limit.Continuous runtime-synapse states and ion/channel states are advanced at the new voltage. Dependent states use independent exponential Euler updates; submodules marked for independent integration dispatch to their configured solvers. The exact family ordering is selected by
target.ion_channel_update_order.
This is a first-order Lie/semi-implicit split: the voltage phase reads the old mechanism state, and the mechanism phase reads the new voltage. It is not a symmetric Strang split, so no general second-order accuracy claim is made. The benefit is a cheap, stable implicit solve for the linear axial block while retaining specialized updates for channel kinetics.
- Parameters:
target (
DiffEqModule) – A multi-compartment cell exposingnode_tree(),node_scheduling(), and a voltage stateV. In practice this is abraincell.Cellinstance whose membrane state is laid out on a node tree compatible with the DHS scheduler.*args – Forwarded verbatim to
DiffEqModule.compute_derivative()and the underlying voltage and channel solvers (typically the input currents being injected this step).
- Returns:
The state of target — voltage, gating variables, and any auxiliary ion states — is updated in place.
- Return type:
None
- Raises:
TypeError – If target is not a
DiffEqModule, or does not expose the node-tree machinery required bydhs_voltage_step().
See also
dhs_voltage_stepSingle implicit-Euler DHS step for the cable voltage.
ind_exp_euler_stepIndependent exponential-Euler kernel used for dependent non-voltage states.
Notes
The staggered scheme is registered as both
"staggered"(canonical) and"stagger"(alias), and can be selected withbraincell.quad.get_integrator().Examples
>>> import brainstate >>> import brainunit as u >>> from braincell.quad import staggered_step >>> # Inside a simulation loop with a Cell instance ``cell``: >>> with brainstate.environ.context(t=0. * u.ms, dt=0.025 * u.ms): ... staggered_step(cell, input_current)