Plotting current (i) delivered by IClamp

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
kathryn

Plotting current (i) delivered by IClamp

Post by kathryn » Mon Aug 25, 2008 12:32 am

I've compiled the iclamp1.mod code from page 219 of The Neuron Book (Example 9.3), in order to add an intracellular stimulating electrode to a model. The custom GUI I built includes a graph for plotting voltage against time, but I was wondering how to generate an equivalent graph for the current delivered (i) by IClamp1. (It's a question provoked by curiosity rather than need, since the graph would only show a rectangular current pulse.)

csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Re: Plotting current (i) delivered by IClamp

Post by csh » Mon Aug 25, 2008 7:22 am

From hoc, you could do:

Code: Select all

objref ic, g
g = new Graph()
ic = new IClamp1(0.5)
g.addvar("ic.i")
addplot(g, 0)
Alternatively, you can use the GUI: Choose "Graph->Current axis" from the menu, right-click on the graph, select "Plot what", left-click "Show->All" in the dialog, select your IClamp1 object in the left panel ("ic" in the example above), select "i" in the middle panel.
The plotting system is explained in chapter 7, pp. 179-181 of the Neuron book.

kathryn

Re: Plotting current (i) delivered by IClamp

Post by kathryn » Wed Aug 27, 2008 12:34 am

csh wrote:Choose "Graph->Current axis" from the menu, right-click on the graph, select "Plot what", left-click "Show->All" in the dialog, select your IClamp1 object in the left panel ("ic" in the example above), select "i" in the middle panel.
Thanks! I used the GUI method. Other readers might like to know I had to double-click the IClamp1 object in the left panel, which brought up "0." in the middle panel (my model's only IClamp1 object). Double-clicking "0." brought up a list of the available variables (including amp, dur, del, and i). From there I selected "i".

Thanks also for directing me to the relevant section of The Neuron Book.

Post Reply