Dynamic clamp

Anything that doesn't fit elsewhere.
Post Reply
Posts: 29
Joined: Sun May 03, 2015 7:05 pm

Dynamic clamp

Post by mganguly » Thu Mar 30, 2017 10:56 am


I am trying to set up a dynamic clamp by importing a series of time varying stimulating currents as a matrix and playing them in VecStim.play. On plotting the stimulation currents, I get a plot consisting of all zeros. Here is the code snippet I am using in Python.

Code: Select all

current = np.genfromtxt('i.csv', delimiter = ',')  #read the matrix consisting of current arrays
t = np.genfromtxt(time.csv',delimiter = ',') # read the time array
stim = {}
for i in range(num_segments):
	stim_name = 'stim%d'%i
	stim[stim_name] = h.IClamp((i/nseg),sec = axon)
	VecT = h.Vector() 

	VecStim = h.Vector()

   stim[stim_name].dur = 1e9
   VecStim.play(stim[stim_name]._ref_amp, VecT, 1)

Is the above code correct for implementing my setup ?


Post Reply