Setting neural parameters in spinnaker on the NRP


#1

I’ve got some agents running in the NRP on a local install using a spinnaker board.
The particular problem is that I cannot change the neuron parameters in the brain model.

fsaCells = sim.Population(10, IF_cond_exp(), label=“fsaCells”) #runs
fsaCells = sim.Population(10, IF_cond_exp({}), label=“fsaCells”) #does not run

Oddly, if I have a population not synapsed in, I can execute this code. I of course can not allocate a population with parameters actually specified instead of just {}.
fsaCells = sim.Population(10, IF_cond_exp({‘v_thresh’:-48.0}), label=“fsaCells”) #does not run

It loads and starts the simulation, but fails on the first return from spinnaker. It gives an error
The simulation encountered an error situation and cannot be recovered…

Does anyone have an idea of how to set the neuron model parameters?


#2

I didn’t try it myself, but it seems that in ‘braitenberg_spinnaker.py’ as used in in the example experiment ‘Husky Braitenberg experiment on SpiNNaker’ the parameters of a population are also adapted, did that work for you?

params = { 
    "v_thresh": formatted_circuit["V_th"], 
    "cm": formatted_circuit["C_m"] * 1e-3, 
    "tau_m": formatted_circuit["C_m"] / formatted_circuit["g_L"], 
    "v_reset": formatted_circuit["V_reset"], 
    "tau_refrac": formatted_circuit["t_ref"], 
    "v_rest": formatted_circuit["E_L"], 
    "e_rev_E": formatted_circuit["E_ex"], 
    "e_rev_I": formatted_circuit["E_in"], 
    "tau_syn_E": formatted_circuit["tau_syn_E"], 
    "tau_syn_I": formatted_circuit["tau_syn_I"] 
} 

cells = [sim.Population(1, sim.IF_cond_exp, dict([(key, value[i]) for key, value in params.items()])) for i in range(8)]

#3

That was really a bit of a dog to unpack, but it does work.
It looks like the third parameter needs to be a dict. So,
params = {
“v_thresh”: -48.0,“cm”: 1.0,“tau_m”: 20.0,“v_reset”: -70.0,
“tau_refrac”: 2.0,“v_rest”: -65.0, “e_rev_E”: 0.0,“e_rev_I”: -70.0,
“tau_syn_E”: 5.0, “tau_syn_I”: 5.0}

cells = sim.Population(1, sim.IF_cond_exp, dict([(key, value) for key, value in params.items()]))

works.

Thanks for the help