Dynamic clamp

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

Dynamic clamp

Post by mganguly »

Hi,

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() 
   VecT.from_python(t)

	VecStim = h.Vector()
	VecStim.from_python(current[:,i])

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

Is the above code correct for implementing my setup ?

Mohit
Post Reply