I am thinking about how to structure the scripts in a way that extending the code need the minimum effort and also avoid possible errors.
A simple example:
Consider we have two neuron model, each have a many parameters.
One approach is to define a function to define the each neuron model.
e.g. neuron A has parameter
E_L, also neuron B has some parameters with the same name and different values.
def neuronA(paramsA): eqs = ''' dv/dt = -gL(v-EL)/tau_L ''' neuron_a = b2.NeuronGroup(...) return neuron_a def neuronB(paramsB): eqs = ''' dv/dt = -gL(v-EL)/tau_L ''' neuron_b = b2.NeuronGroup(...) return neuron_b S =b2.Synapses(neuron_a, neuron_b) ...
The problem is that when we want to define the synapse, the same parameter names conflict. Am I right?
Another approach is to define a large function and put all the required neurons inside the big function and change the parameter name to be different, e.g.
E_L_B , …
Do you have any idea?