Expand description
Batch parity with WongWangUnit.step in
src/sc_neurocore/neurons/models/wong_wang.py (Wong & Wang 2006,
J. Neurosci. 26:1314β1328).
Per step:
i_k = j_n * s_k - j_cross * s_(3-k) + i_0 + stim_k + sigma * xir_k = phi(i_k)wherephi(i) = (a*i - b) / (1 - exp(-d*(a*i - b)))with singularity guard|a*i - b| < 1e-6 -> 1/d.- integrate the coupled
s1,s2ODE with fixed-step RK4 while holding the stepβs pre-drawn noise sample constant. - clamp
s_kinto[0, 1]after the candidate state is finite.
The Python primary draws np.random.randn() twice per step; the
Rust simulator takes xi pre-drawn from the Python RNG so trajectories
are bit-exact for matching seeds. This mirrors the ping.rs +
PINGCircuit pattern: Python owns the RNG, Rust owns the inner loop.
ConstantsΒ§
FunctionsΒ§
- derivatives π
- phi π
- simulate
- Simulate
n_stepsWong-Wang iterations; write per-step state + firing-rate traces.ximust be length2 * n_steps(two noise samples per step, consumed ini1, i2order).