Page 1 of 1

a specific function form in the current clump

Posted: Sun Jan 11, 2009 2:08 pm
by thats_karlo
Dear All,

Instead of step current in the current clamp protocol, i want to use a specific function. For this function i have only a file of data in format of *.dat (no analytical formula;like a ramp, sinusoidal or..). I want my current clamp protocol follows the pattern of the data in the *.dat file.

Any suggestions?

Re: a specific function form in the current clump

Posted: Mon Jan 12, 2009 10:00 am
by ted
Use the Vector class's play method with continuous == 1. See http://www.neuron.yale.edu/neuron/stati ... .html#play
vsrc.play(&var or stmt, Dt or Tvec, continuous)
. . .
When continuous is 1 then linear interpolation is used to define the values between time points

Re: a specific function form in the current clump

Posted: Mon Jan 12, 2009 12:52 pm
by TWA
I guess the only other thing to do is to read the file into the vector that you then "play". It looks like the vector scanf command will do the trick assuming you have saved the data as ascii text. Actually, it looks like there's one more thing. The var should be the i variable of your iclamp object.

Re: a specific function form in the current clump

Posted: Mon Jan 12, 2009 2:13 pm
by ted
TWA wrote:The var should be the i variable of your iclamp object.
Not quite.
1. del should be 0
2. dur should be 1e9 (to accommodate time courses of any length)
3. the variable to drive is amp, not i

Re: a specific function form in the current clump

Posted: Mon Jan 12, 2009 5:57 pm
by thats_karlo
Thanks,


I forgot to mentioned the *.dat file containes tow column; first time and second one, the value of function. if by scanvar() function we read the data file as follow:

Code: Select all

...
f.ropen("data1.dat")
for i=0, row_file -1 {   // row-file  =size of the file
                             T.x[i]=f.scanvar()    // time
                             TV.x[i]=f.scanvar()  // function value
                            }  
Then, How do i have to define "amp" and "dur" in current clamp protocol? do you think, the following code3 is the correct way:

Code: Select all

objectvar stim
soma stim = new IClamp(0.5)
stim.del = 0
     for i = 0, row_file -1{    
    stim.dur = T.x[i]
    stim.amp = TV.x[i]
}
  

And, please give me your advice, if we are going to use the function in a voltage clamp protocol

Re: a specific function form in the current clump

Posted: Mon Jan 12, 2009 10:36 pm
by ted
How do i have to define "amp" and "dur" in current clamp protocol?
stim.dur = 1e9
ivec.play(&stim.amp, tvec, 1)
where ivec is the name of the Vector that contains the sequence of current values, and tvec is the name of the Vector that contains the corresponding time values.

Re: a specific function form in the current clump

Posted: Tue Jan 13, 2009 9:45 am
by thats_karlo
Dear Ted,

Thank so much for your help. The current clamp protocol works exactly as i wanted. Please, tell me what we have to do if we want to apply the same kind of *.dat file to a voltage clamp protocol. For voltage clamp, i'm using SEClamp(). the previous trick, is not working here like stim.dur2=1e9 and Vvec.play(&stim.amp2,Tvec,1). what's your suggestion?

Re: a specific function form in the current clump

Posted: Tue Jan 13, 2009 10:41 am
by ted
Use SEClamp
Set rs to a small value, e.g. 0.1 megohm
Make dur1 = 1e9
Play the waveform into amp1

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 1:43 am
by thats_karlo
Dear Ted,

Thanks so much for your help. i have another question to ask;

what strategy do we have to follow; to study the propagation of a specific form of a signal. suppose,we have the signals in the from of a *.dat file and we want to insert this signal on different sections of the molded cell.

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 8:01 am
by ted
If you are asking how to place a point process, such as an IClamp or SEClamp, at a particular location on a particular section, the answer depends on whether you are interested in just a few locations, or need to probe many locations. If the former, it is easiest to use the GUI--click on the PointProcessManager's Show button and select "Shape", then in the shape plot click on the location of interest and the point process will move to that site.

If you need to probe many locations, program control will be more convenient. Read this item
Point processes: loc() and get_loc()
in the Hot tips area of the NEURON Forum.

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 12:40 pm
by thats_karlo
I want to insert only one , let's say, point process at a position on denderitic section.The problem i have is; to transfer a specific signal shape to a section (as voltage clamp).
I guess voltage clamp is not a good idea, then what i have to do?

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 12:54 pm
by ted
What kind of signal are you talking about? Voltage or current? If the former, why not use SEClamp?

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 1:08 pm
by thats_karlo
the signal shape has saved in *.dat file. Can i use the SEClamp inserted in a specific dendritic section, and use the same algorithm as described in previous posts, to transfer the signal to the cell?

Re: a specific function form in the current clump

Posted: Thu Jan 22, 2009 5:03 pm
by ted
Should be able to. Please see my note dated Jan. 13, 2009.