@@ -297,6 +297,32 @@ def test_update_SpikeSourceArray(sim, plot_figure=False):
297297 assert_array_equal (data [0 ].magnitude , np .array ([12 , 15 , 18 , 22 , 25 ]))
298298
299299
300+ @run_with_simulators ("nest" , "brian2" )
301+ def test_IF_curr_delta_voltage_step (sim ):
302+ """A single delta-synapse input steps V by the weight (mV).
303+
304+ Guards the Arbor weight scaling: a lif_cell delta event adds weight/C_m to
305+ V_m, so the connection weight is scaled by C_m to recover PyNN's mV step.
306+ """
307+ sim .setup (timestep = 0.1 )
308+ v_rest = - 65.0
309+ weight = 5.0 # mV voltage step
310+ source = sim .Population (1 , sim .SpikeSourceArray (spike_times = [20.0 ]))
311+ cell = sim .Population (1 , sim .IF_curr_delta (
312+ v_rest = v_rest , v_reset = v_rest , v_thresh = - 40.0 ,
313+ tau_m = 20.0 , cm = 1.0 , tau_refrac = 0.1 ),
314+ initial_values = {'v' : v_rest })
315+ sim .Projection (source , cell , sim .AllToAllConnector (),
316+ sim .StaticSynapse (weight = weight , delay = 1.0 ),
317+ receptor_type = "excitatory" )
318+ cell .record ('v' )
319+ sim .run (60.0 )
320+ v = cell .get_data ().segments [0 ].filter (name = 'v' )[0 ].magnitude [:, 0 ]
321+ step = v .max () - v_rest
322+ assert abs (step - weight ) < 1e-12 , step
323+ sim .end ()
324+
325+
300326@run_with_simulators ("nest" , "neuron" , "brian2" )
301327def test_composed_neuron_model_homogeneous_receptors (sim , plot_figure = False ):
302328 sim .setup ()
0 commit comments