You can't import the hoc file back into the NetGUI tool.Dong Xu wrote:1. I used NetWork Builder to build a simple network. and save it to a hoc file.
then I did some addition to the hoc file. How can I get a spike plot and the NetGUI derived from that hoc file?
It's easy to make your own spike plot. In short, use the NetCon class's record() method
to capture the spike times of the cells, plus cell identification numbers, to a pair of Vectors.
Then use the Vector class's mark method to draw | on a graph. Here's how, assuming that all your cells are in a List called cells:
Code: Select all
objref nil, tobj // create a NULLobject objref and a "temporary" objref
objref ncreclist, stvec, idvec // to hold new NetCons, and to record spike times and cell IDs
for i = 0, cells.count()-1 {
tobj = new NetCon(cells.object(i), nil)
tobj.record(stvec, idvec, i)
}
objref tobj // so tobj can't be used to do accidental damage
// generate a raster plot
objref g, tmpvec
proc plotspikes() {
// cell ids start at 0, but we don't want to draw any spikes on the x axis)
tmpvec = new Vector()
tmpvec.c(idvec)
tmpvec.add(1)
g = new Graph()
tmpvec.mark(g, stvec, "|")
}
// automate plotting after a run
proc run() {
stdinit()
continuerun(tstop)
plotspikes()
}
load this code after all your other hoc code has been loaded.
Read about NetCon record() here
http://www.neuron.yale.edu/neuron/stati ... tml#record
Read about Vector mark() here
http://www.neuron.yale.edu/neuron/stati ... .html#mark
You want a "Hinton plot"--see2. I made a 10*10 matrix, each represents a Intefire1. how can I draw a graph of 10*10 squares using different colors representing M of individual intefire cell?
http://www.neuron.yale.edu/neuron/stati ... tml#hinton
You'll need to change the colormap to something that spans the range
0 . . . 1