Brain2 library parameters

Brain2 library parameters

by Kiarash Farivar -
Number of replies: 1

Hi

I don't understand how brain2 handles parameters. (for instance in this code: https://lcn-neurodynex-exercises.readthedocs.io/en/latest/_modules/neurodynex3/exponential_integrate_fire/exp_IF.html#simulate_exponential_IF_neuron)

first we define the differential equation as a string and send it to NeuronGroup. Then we run the simulation by calling Network and then net.run. How does the library receive the actual values of the parameters like tau or even the injected current I_stim(t,i) ? (The only value that is explicitly set is v_rest.)

Tags:
In reply to Kiarash Farivar

Re: Brain2 library parameters

by Christos Sourmpis -

Hello Kiarash,
"Equations defining neuronal or synaptic equations can contain references to external parameters or functions. These references are looked up at the time that the simulation is run. If you don’t specify where to look them up, it will look in the Python local/global namespace (i.e. the block of code where you call 

)."

Basically is like writing a normal command without the string. Also, if you notice is not the v_rest that is set but the voltage v, which is equivalent as setting the initial condition.
You can see more about this here:
https://brian2.readthedocs.io/en/stable/user/equations.html 
In the external variables section.

Cheers,
Christos