Add point-neuron and current-source support to the Arbor backend#846
Open
apdavison wants to merge 6 commits into
Open
Add point-neuron and current-source support to the Arbor backend#846apdavison wants to merge 6 commits into
apdavison wants to merge 6 commits into
Conversation
Implement IF_curr_delta by mapping it onto Arbor's native leaky integrate-and-fire cell (arbor.lif_cell, cell_kind.lif). Note that native lif cells cannot take an injected current, so non-zero `i_offset` and `DCSource` injection raise NotImplementedError. Verified on Arbor 0.10.0 and 0.12.2.
Implement point neurons (IF_cond_exp, IF_curr_exp and the composable PointNeuron) as single-compartment Arbor cable cells, complementing the native lif_cell used for IF_curr_delta in phase 1. - pas leak with specific cm/g_leak derived from the whole-cell cm/tau_m so the absolute C_m and g_leak match PyNN's values; - new lif.mod reset mechanism: the threshold_detector emits the network spike and, via POST_EVENT, reloads a refractory countdown that clamps V to v_reset (Arbor NMODL has neither absolute time nor WATCH); - new expsyn_curr.mod current-based synapse; conductance synapses reuse expsyn; i_offset and DCSource become iclamp stimuli. IF_cond_exp/IF_curr_exp are flat standard models whose translate() calls the base class translate() and wraps the result; the composable PointNeuron assembles the same builder input from its components. Cross-checked against NEURON (exact) and Brian2/NEST on f-I and EPSP amplitude; verified on Arbor 0.10.0 and 0.12.2. Also enable the arbor backend on the scenario tests it now passes (simulation control, DCSource injection, SpikeSourcePoisson parameters, procedural+OO recording).
Only DCSource injected current on the Arbor backend; StepCurrentSource, ACSource and NoisyCurrentSource inherited the base inject_into that raises NotImplementedError. This implements all three so every standard current source works on Arbor cable cells (point neurons and multicompartment). Each source is now realised as one or more Arbor iclamp "components", a (envelope, frequency_Hz, phase_deg) tuple where the envelope is a list of (time_ms, amplitude_nA) points. This unifies the two previously divergent current-source loops in the cell-description builders into one shared placement path, and moves all waveform/shape logic onto the source classes (as the NEURON backend does).
Prepare for the remaining standard point-neuron cell types, which differ from LIF in the membrane properties, the leak/channel densities, the reset/dynamics mechanism and the spike-detector threshold.
Extends the Arbor point-neuron support with five more standard cell types, all realised as single-compartment cable cells via the PointNeuronDynamics abstraction and cross-validated against the NEURON backend.
…ackend Completes the tractable missing standard cell types, all as single-compartment cable cells via PointNeuronDynamics, cross-validated against NEURON.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Arbor backend previously supported only multi-compartment cells and a couple of spike sources. This PR brings it close to parity with the NEURON/NEST/Brian2 backends by adding point neurons (as single-compartment Arbor cable cells) and the time-varying current sources, all cross-validated against the NEURON backend.
Point neurons are realised as single-compartment cable cells. The network spike is emitted by the cell's threshold_detector, and the post-spike reset is done by a custom NMODL POINT_PROCESS driven by POST_EVENT, because as far as I can see Arbor's NMODL dialect has no absolute time t, no WATCH, no net_send and no spike queues, so the NEURON .mod files can't be ported verbatim and have been rewritten to this pattern. A PointNeuronDynamics abstraction (in cells.py) holds the per-model differences (membrane properties, leak/channel densities, reset/dynamics mechanism, detector threshold), so one builder serves every kind.
Not yet done: