I have been dealing with a specific problem for the past weeks, and I cannot wrap my head around it. Basically, I have a cell with multiple sections where I want to inject a specific voltage in mV, coming from a cell in NEST. Since I cannot form any synapses between them, I thought about artificially stimulating the NEURON cells with the exact value that should be sent by the NEST cells.
For this matter, I chose to work with VClamps, and this is the code that I got for the stimulation:
Code: Select all
stim = h.VClamp(soma(0.5))
def stimulate():
stim.amp[0] = 0
stim.dur[0] = 5
stim.amp[1] = 40
stim.dur[1] = 0.1
stim.amp[2] = self.stim.dur[2] = 0
soma_v_vec = h.Vector()
t_vec = h.Vector()
soma_v_vec.record(soma(0.5)._ref_v)
t_vec.record(h._ref_t)
h.finitialize(-65)
stimulate()
h.tstop = 10
h.run()
pyplot.figure(figsize=(8,4))
soma_plot = pyplot.plot(t_vec, soma_v_vec)
pyplot.xlabel('time (ms)')
pyplot.ylabel('mV')
pyplot.show()
Instead this is what I get:
Apparently, VClamps only "set" the signal to the specified voltage instead of injecting it to the already existing voltage.
Am I doing it right ? Am I missing something ? Is it a matter of parameters inside the soma ? Currently I have a hh module, with standard values, is that what's causing the issue here ?
Thank you so much,
Camil