pub(crate) fn py_adc_to_spike_windows<'py>(
py: Python<'py>,
samples: PyReadonlyArray1<'py, i64>,
adc_width: u32,
q_int: u32,
q_frac: u32,
decimation: u32,
signed_input: i64,
threshold_q: i64,
) -> PyResult<Py<PyAny>>Expand description
Encode raw ADC samples into per-window spike rate codes.
Parity contract with sc_neurocore.sensors.adc_to_spike_kernel: this Rust
path and the Julia, Go, Mojo and Python backends return bit-identical arrays
because the per-window quantise/average/rate-code arithmetic is exact integer.
signed_input is 0 for offset-binary or 1 for two’s-complement ADC
samples. Returns a dict with window_values_q (int32), spike_counts (int32)
and polarities (bool), each of length samples.len() / decimation.