Skip to main content

Module ping

Module ping 

Source
Expand description

Step-by-step parity with PINGCircuit.step in src/sc_neurocore/network/gamma_oscillation.py.

Per dt:

  1. Decay AMPA / GABA conductances by exp(-dt/tau_*).
  2. Compute I = -g_L*(V-E_L) - g_AMPA*(V-E_AMPA) - g_GABA*(V-E_GABA) + I_drive + sqrt(dt)*sigma*xi. (xi is supplied externally as a pre-drawn N(0,1) array so the Rust path stays bit-deterministic for matching seeds — see tests/test_gamma_oscillation.py::TestPINGCircuitDeterminism.)
  3. Update V Euler-style; cells in refractory are clamped to V_reset.
  4. Detect spikes (V >= V_th, not in refractory).
  5. Reset spiked cells to V_reset, start refractory window.
  6. Decrement refractory counters; clamp to 0.
  7. Return per-cell spike booleans + total per-population spike counts so the Python wrapper can propagate to conductances.

This is the kernel for the per-step inner loop. The Python side still owns:

  • the per-instance RNG (so noise stays seed-deterministic across the two backends);
  • the cross-population conductance update step (g_ampa_e += w_ee * n_e_spikes etc — handled by the caller).

Functions§

step_kernel