Visualizing multiple point processes in the same window

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Visualizing multiple point processes in the same window

Post by Annik » Mon Mar 17, 2014 1:31 pm

I was wondering if there is a way to have multiple point processes of the same type displayed on a shape plot of the cell. I know the point process viewer displays a list of PPs, but I was hoping there is some way I could use the existing windows or design my own window to show them as dots on the cell (as you see with the Point Process Manager).

Thanks,
Annik

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

Re: Visualizing multiple point processes in the same window

Post by ted » Mon Mar 17, 2014 1:54 pm

You can do this with the Shape class's point_mark method, documented here http://www.neuron.yale.edu/neuron/stati ... shape.html.

Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Re: Visualizing multiple point processes in the same window

Post by Annik » Mon Mar 17, 2014 3:58 pm

I have:

Code: Select all

// make the shape plot for point process tracking 
save_window = new Shape()
save_window.size(-245.449,315.449,-160,330)
for i = 1,Gstim.count(){
	save_window.point_mark(Gstim.o(i), 2, "o", 4)
	}
{save_window.view(-245.449, -160, 560.898, 490, 700, 500, 350.4, 304.96)}
fast_flush_list.append(save_window)
save_window.save_name("fast_flush_list.")
save_window.exec_menu("Shape Plot")
save_window.exec_menu("Show Diam")
save_window.exec_menu("View = plot")
Where Gstim is a list of GABAergic synapses which are randomly distributed over a section.

When I run the code I get the following error:

Code: Select all

nrniv: Arg out of range in user function
 in makeWindows.hoc near line 106
        }
   ^
List[9].o(40        )
xopen("makeWindows.hoc"      )
xopen("mosinit.hoc"    )
run_sim(  )
What are the appropriate arguments?

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

Re: Visualizing multiple point processes in the same window

Post by ted » Mon Mar 17, 2014 4:31 pm

What are the appropriate arguments?
The essential clue is in the error message:

Code: Select all

nrniv: Arg out of range in user function
 in makeWindows.hoc near line 106
 . . .
List[9].o(40        )
In some programming languages, the first element in a list or vector or array has an index number of 1. But hoc is patterned after C, and in C the first element in an array has an index number of 0. Consequently in hoc the first element in an array, Vector, or List is the one whose index number is 0, and the last element has an index number equal to (number of things in the array, Vector, or List) - 1.

Post Reply