Description of problem
hi there, I am new to Brian2 so apologies if this is an obvious mistake.
I am trying to run an LIF networks where I can explicitly add current to two variables I_e (external current) and I_i (internal current) which are then added onto the voltage in the model at each step.
As a test to see that this is working correctly I have simply added the inputs from I_e and I_i to the current voltage, using the equations provided from Brian2 LIF examples and compared the spikes. But weirdly when I do this the results look quite different - I was wondering if I am incorrectly assigning my variables?
Minimal code to reproduce problem
here is my model:
lif ="""
dv/dt = -(V-v_rest) / t_tau : 1 (unless refractory)
V = v + I_e + I_i : 1 #combine current voltage with incoming currents
I_i : 1 #internal current
I_e : 1 #external current"""
here is the model i am trying to reproduce - if my equation is doing what it should be doing the output should be the same
lif = ââ"
dv/dt = -(v-v_rest) / t_tau : 1 (unless refractory)"""
What you have already tried
i think the error may be to do with how I am adding current to my I_i and I_e variables.
In the online examples i can see that internal weights are accumulated to the voltage variable, via on_pre as âv+=wâ.
Given that I am adding I_i onto v in my equation I have changed this to on_pre: âI_i = wâ
Similarly for the Poisson input group the target_var from the online examples was âtarget_var = vâ, which I have changed to âtarget_var = I_eâ
One thing in particular I have noticed is that it seems like the I_e variable accumlates current from previous time steps when it should just add the current from the input from that time step alone - I am not sure how exactly to fix this?
Any thoughts on why the equations are not doing the same thing would be much appreciated!
Thanks!