Page 1 of 1

Visualizing multiple point processes in the same window

Posted: Mon Mar 17, 2014 1:31 pm
by Annik
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

Re: Visualizing multiple point processes in the same window

Posted: Mon Mar 17, 2014 1:54 pm
by ted
You can do this with the Shape class's point_mark method, documented here http://www.neuron.yale.edu/neuron/stati ... shape.html.

Re: Visualizing multiple point processes in the same window

Posted: Mon Mar 17, 2014 3:58 pm
by Annik
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?

Re: Visualizing multiple point processes in the same window

Posted: Mon Mar 17, 2014 4:31 pm
by ted
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.