Page 1 of 1

Dynamic clamp

Posted: Thu Mar 30, 2017 10:56 am
by mganguly

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 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[stim_name]._ref_amp, VecT, 1)

Is the above code correct for implementing my setup ?