Hello
I would like to generate the shape plot using the code, which I create using GUI. However the session file saved for this GUI session doesnt produce comparable results.
Secondly I would like to create the shape plot after some giving time t(ms) for example after 5000ms.
Thanks in Advance
Shape Plot Query
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Shape Plot Query
Yes, it is easy to make a graph that shows the shape of the cell rendered with a color scheme that reflects the value of a range variable--namrata27 wrote:I would like to generate the shape plot using the code, which I create using GUI. However the session file saved for this GUI session doesnt produce comparable results.
NEURON Main Menu / Graph / Shape plot
creates a new Shape window,
then click on the Shape window's menu box (in its left upper corner) and select "Shape plot" from the popup menu
and the result is a false color depiction of the cell's branched architecture. By the way, this false color graph is actually an instance of the PlotShape class.
All well and good. BUT if you save the Shape plot to a session file, then read that session file, you get an ordinary Shape window with all sections drawn in black, no color scale, and the cell shape remains black throughout the simulation. You _could_ click on the Shape window's menu box and select "Shape plot" again, but since you're writing code you can just take advantage of the exec_menu method, a feature of the Graph and Shape classes that is equivalent to selecting one of the items in the graph's menu--see
http://www.neuron.yale.edu/neuron/stati ... #exec_menu
For example, if you used the GUI to set up your false color plot, and saved the GUI to a session file called plotshape.ses, you can
Code: Select all
load_file("plotshape.ses")
// the next line assumes that there is only one PlotShape in the session file
PlotShape[0].exec_menu("Shape Plot") // this enables the "false color" feature
Code: Select all
objref ps
ps = new PlotShape()
ps.variable("v") // when fully configured, will show membrane potential in color
fast_flush_list.append(ps) // so ps will be updated during a simulation
ps.exec_menu("View = plot") // makes sure the entire cell fits in the window
ps.exec_menu("Shape Plot") // this enables the "false color" feature
// if you expect v to lie in the range low..high and need to adjust the mapping of v to color
// ps.scale(low,high)
I'll answer this separately.I would like to create the shape plot after some giving time t(ms) for example after 5000ms.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Shape Plot Query
This can be done with the strategy describe innamrata27 wrote:I would like to create the shape plot after some giving time t(ms) for example after 5000ms.
Using events to implement "interrupts"
viewtopic.php?f=28&t=2769
Specifically, in proc userinthandler() just change this statement
Code: Select all
print "replace this with what you want to happen when an interrupt occurs
Code: Select all
// flush (update) graphs on the fast_flush_list
flushPlot()
continue_dialog("interrupt!")