Hello, Marcel. I am working with a network of synaptically interconnected excitatory PYR neurons and inhibitory PVN neurons. A small tonic external current Iapp is being injected into all PYR cells to drive network activity. What I wish to do now is inject a brief strong pulse of current into one PYR cell of the network. I tried coding this by making Iapp variable time-dependent in one of the cells. This naïve effort gave syntax errors. Can you suggest a solution? Unfortunately, the guide on input stimuli (Input stimuli — Brian 2 2.7.1 documentation) did not seem to offer a clear answer to my problem.
Here is some of the code. I have removed some components (incl. synaptic currents) here to focus on the problem at hand.
N1 = 5000 *# number of PYR neurons in network*
eqs_pyr = """
Iapp : amp
k = (int(v<vt) * klow) + (int(v>=vt) * khigh) : siemens/volt
dv/dt = (k*(v-vr)*(v-vt)+Iapp)/C_pyr : volt
"""
reset = '''
v = c
'''
PYR = NeuronGroup(N1, model=eqs_pyr, reset=reset, threshold='v >= vpeak', method = 'euler')
#create one cell, PYR1, into which a current pulse can be applied**
PYR1 = PYR[:4999]
PYR2 = PYR[1:]
I would like to add Ipulse to the PYR eqs to give
eqs_pyr = """
Iapp : amp
Ipulse : amp
k = (int(v<vt) * klow) + (int(v>=vt) * khigh) : siemens/volt
dv/dt = (k*(v-vr)*(v-vt)+Iapp + Ipulse)/C_pyr : volt
"""
So how do I, e.g., step Ipulse
up from 0 during, e.g., a 20 msec window in the middle of the run in PYR1 only? Alternatively, do built-in Brian2 functions offer a method for current-clamp pulse injection?