Cumulative Frequency Spike Plot

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc or Python
Post Reply
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Cumulative Frequency Spike Plot

Post by tsa »

Hello,

I'm attempting to create code for a cumulative frequency spike plot for a population of 25 neurons similar to that which is included in the spikeplot feature of Network Builder. I've had success writing hoc to create raster plots for networks not created with the GUI but I'm having little luck with this. My code is based on the code for the SpikePlot feature included with NEURON. If anyone can offer any suggestions or can point me to another cumulative frequency method I would greatly appreciate it.

Here is my code:

objref vecs[24], vec, gg, yy

proc freqplot() {
yy = new Vector()
binwidth=10
for i=0, 24 {
vec = new Vector()
vec.record(&HG_HG.soma.v(0.5))
vecs=vec
}
for i=0, 24 {
yy=yy.append(vecs)
}
high=24
yy=yy.sumgauss(0,high,high/50,binwidth)
yy.label(vecs.label)
gg = new Graph()
yy.line(gg, yy.c.indgen(0, high/50), 1, 1)
yy =yy.histogram(0,tstop,binwidth)
yy=yy.c(1)
yy.line(gg, yy.c.indgen(0, binwidth), 1, 1)
}
freqplot()

Currently the hoc code loads only to get stuck in an endless segmentation errors citing a line not included in the above code.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

Spikeplot use netcon to record spikes, you are using the vec record method. As a result you are not recording threshold crossing but you are recording the whole voltage trace.

In spikeplot.hoc the update function shows you how netcon is used for recording spikes.
Post Reply