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
}
}
Current record and plot
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Current record and plot
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
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