I am new to the Brian2 simulator and I am a bit confused about 2 things:
- When defining a synapse, is a weight indirectly added to the neuron, or do I need to specify a weight? I have this code that I wrote:
synapse_equations = ''' dcontrol/dt = -control/(tau_value) : amp*meter**-2 total_post = (control/(coming_neurons - 1))*int(coming_neurons > 1) + (control/(coming_neurons))*int(coming_neurons == 1) + 0*amp*meter**-2*int(coming_neurons == 0) : 1 (summed) coming_neurons : 1 ''' syn = Synapses(neuron, neuron, synapse_equations, on_pre = 'control += w', method = 'euler')
where the variable “control” tracks the amount of amps/meter^2 from a pre-synaptic neuron to a post-synaptic neuron, and once it fires an action potential, a weight of w is added to “control” of the pre-synaptic variable. The variable “total” collects all of the “control” amounts from each pre-synaptic neuron and sums them up together and then divides everything by the number of pre-synaptic neurons. The variable “coming_neurons” represents the number of pre-synaptic neurons connected to a post-synaptic neuron.
I am worried that if a weight is automatically added once you use Synapse(), then by specifying another equation using on_pre, then I would be adding a weight two times. Is this the case or is it not automatically added when you use Synapse()?
- I am trying to use inhibitory and excitatory neurons for my neuron model, but I haven’t found a way to specify if neurons are excitatory or inhibitory. I saw this example on Brian2’s website: https://brian2.readthedocs.io/en/stable/examples/frompapers.Stimberg_et_al_2018.example_1_COBA.html, where different synaptic conductances and neurotransmitters were used in order to tell the difference between the neurons. Is this the only way of specifying inhibitory and excitatory neurons in Brian2, or are there other ways?
Thank you in advance for your help!