Current record and plot

The basics of how to develop, test, and use models.
Post Reply
Hessum
Posts: 2
Joined: Thu Apr 25, 2013 7:34 am

Current record and plot

Post by Hessum »

Hello
I made new current stimulation named "IClamp2" which is injecting the exponential current in the cell. Now I want to check it and be sure of it's correctness, but I don't know how record current and plot it in the graph. here is my code of "IClamp2" if it's helping:

: Exponential Current Clamp

NEURON {
POINT_PROCESS IClamp2
RANGE del, dur, amp, tau, i
ELECTRODE_CURRENT i
}
UNITS { (nA) = (nanoamp) }

PARAMETER {
del (ms)
dur (ms) <0, 1e9>
tau (ms)
amp (nA)
}
ASSIGNED { i (nA) }
INITIAL { i = 0 }

BREAKPOINT {
at_time(del)
at_time(del+dur)
if (t < del + dur && t > del) {
i = amp*(1-2.718^(-(t-del)/tau))
} else {
i = 0
}
}
ted
Site Admin
Posts: 5784
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Current record and plot

Post by ted »

Patterned nicely after stim.mod (source for IClamp). Should work, but why use
2.718^(-(t-del)/tau)
instead of
exp(-(t-del)/tau)
?

If you want to record the generated values, and the times at which they were generated, use the Vector class's record method. To plot the contents of one Vector against those of another, use the Vector class's plot method. Read about them here
http://www.neuron.yale.edu/neuron/stati ... tml#Vector
Post Reply