How to change the unit in the grapher

Anything that doesn't fit elsewhere.
Post Reply
neuronuser

How to change the unit in the grapher

Post by neuronuser »

I plotted the voltage dependence of G an Gmax in the grapher, then added the current, but the vertical calibration didn't change(I think its unit should be s/cm2, as the gmax is 0.01 as I set.). How can I know and change the unit of the axis? (Ex. nA, ect.). Besides, how can I delete a variable (such as G) in the grapher?
Thanks in advance!
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to change the unit in the grapher

Post by ted »

The plotted values are the numerical values of the expression that you are plotting. To discover the units of any variable that belongs to a mechanism specified with NMODL, examine the variable declaration blocks in the NMODL source code (i.e. the ASSIGNED, PARAMETER, and STATE blocks).

To learn how to rescale or specify the Grapher's graph axes, see
viewtopic.php?f=9&t=1429

The Grapher's graph (any graph, really) can plot the numerical results of an arbitrary algebraic formula. For example, suppose variable iz is in units of nA and you want to plot its value in uA. When you specify what should be plotted, enter

Code: Select all

1000*iz
in the "Plot what?" tool's edit field.

To delete a variable from the graph's plot list, click on its menu box, drag the cursor down to the primary menu's "Delete" item, then release the mouse button. Next position the cursor on the name of the variable on the graph's canvas, and click the mouse button. The variable's name will disappear from the canvas, and the variable will be removed from the graph's plot list. To prevent unintended deletion of other items, the very next thing you should do is to return the graph to Crosshair mode--by bringing up the graph's primary menu and selecting the first item, which is called "Crosshair" (of course).
neuronuser

Re: How to change the unit in the grapher

Post by neuronuser »

Thank you, Ted. I’ve learned a lot from your reply. I’m a green hand to NEURON, and can’t write programs. So I haven’t found where the the variable declaration blocks are.
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to change the unit in the grapher

Post by ted »

neuronuser wrote:I’m a green hand to NEURON, and can’t write programs.
Maybe so, but with little effort you can learn to read them, or at least skim for key contents. Start by reading chapters 5 and 6 of The NEURON Book, or
Hines, M.L. and Carnevale, N.T.
The NEURON simulation environment.
Neural Computation 9:1179-1209, 1997.
http://www.neuron.yale.edu/neuron/papers/nc97/nctoc.htm
to get an overview of NEURON.
So I haven’t found where the the variable declaration blocks are.
Variable declaration blocks are a feature of the NMODL programming language, which is used to expand NEURON's library of biophysical mechanisms. Files that contain NMODL code typically end with ".mod". To learn about NMODL and variable declaration blocks, read chapter 9 of The NEURON Book, or
Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL.
Neural Computation 12:995-1007, 2000.
auatai
Posts: 29
Joined: Mon Sep 14, 2009 6:33 am

Re: How to change the unit in the grapher

Post by auatai »

Dear Ted,

From your reply to the above query, am I correct in understanding that, if I have specified the units for cai as (mM) and on plotting soma.cai(0.5), I get a plot wherein the crosshair shows me a value of say 0.002 for the y-coordinate at a certain point, then the value of cai at that instant is .002 mM.

Thanks in advance
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to change the unit in the grapher

Post by ted »

The short answer is yes.

Which brings up the following special considerations.

NEURON and NMODL have a policy with regard to ionic concentrations:
1. Variable names used to denote intra- and extracellular concentrations of any ionic species s must be of the form si and so, respectively.
2. If si and/or so is used in a mod file, there must be a corresponding USEION statement. For example, a calcium pump whose activity depends on cao and cai, affects only cai, and generates a flux of ca that is not coupled to the flux of any other ion or charge carrier, will have a USEION statement of the form
USEION ca READ cai, cao WRITE ica, cai
3. Concentration units _must_ be millimolar.
4. Each concentration that is used must be declared in the appropriate variable declaration block, along with a specification of its units. For the above example,

Code: Select all

ASSIGNED {
  cao (millimolar)
  . . .
}
STATE {
  cai (millimolar)
  . . .
}
auatai
Posts: 29
Joined: Mon Sep 14, 2009 6:33 am

Re: How to change the unit in the grapher

Post by auatai »

Thanks Ted !
Post Reply