Skip to main content

py_mihalas_niebur_simulate

Function py_mihalas_niebur_simulate 

Source
pub(crate) fn py_mihalas_niebur_simulate<'py>(
    py: Python<'py>,
    v0: f64,
    theta0: f64,
    i1_0: f64,
    i2_0: f64,
    v_rest: f64,
    v_reset: f64,
    theta_reset: f64,
    theta_inf: f64,
    tau_v: f64,
    tau_theta: f64,
    tau_1: f64,
    tau_2: f64,
    a: f64,
    b: f64,
    r1: f64,
    r2: f64,
    dt: f64,
    n_steps: usize,
    current: f64,
) -> (Bound<'py, PyArray1<f64>>, i64, f64, f64, f64, f64)
Expand description

Parity contract with sc_neurocore.neurons.models.mihalas_niebur.MihalasNieburNeuron.simulate: for the same parameters and constant input the returned v trace, total spike count, and final (v, theta, i1, i2) state are bit-identical to the Python RK4 reference. The Mihalas-Niebur 2009 generalised integrate-and-fire model has a purely linear right-hand side (no transcendental functions), so every RK4 stage is exact arithmetic and the trace reproduces to the last bit across Rust/Julia/Go (Mojo FMA-fuses, validated non-amplifying).