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.
Post Reply
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Cumulative Frequency Spike Plot

Post by tsa »


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()
for i=0, 24 {
vec = new Vector()
for i=0, 24 {
gg = new Graph()
yy.line(gg, yy.c.indgen(0, high/50), 1, 1)
yy =yy.histogram(0,tstop,binwidth)
yy.line(gg, yy.c.indgen(0, binwidth), 1, 1)

Currently the hoc code loads only to get stuck in an endless segmentation errors citing a line not included in the above code.
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Hanze University of Applied Sciences

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