Search found 47 matches

by pfortier
Fri Nov 16, 2012 6:11 pm
Forum: Anatomically detailed models
Topic: changing section lengths
Replies: 7
Views: 2878

changing section lengths

I loaded an SWC file into NEURON. I inserted voltage-gated channels in the dendritic tree. I wanted to change the density of channels at regular distances along the dendritic tree but the section lengths vary. The only option that has come to mind was to manually change the input file. For example, ...
by pfortier
Thu Aug 23, 2012 4:23 pm
Forum: Getting started
Topic: nrngui vs nrniv
Replies: 2
Views: 2372

Re: nrngui vs nrniv

Using "i686/special orientkeys.hoc -" worked perfectly.

Thanks,
Pierre
by pfortier
Thu Aug 23, 2012 12:03 pm
Forum: Getting started
Topic: nrngui vs nrniv
Replies: 2
Views: 2372

nrngui vs nrniv

When I run "nrngui orientkeys.hoc" everything works fine as shown below: pfortier@uric:[OrientKeys]$ nrngui orientkeys.hoc NEURON -- Release 7.1 (359:7f113b76a94b) 2009-10-26 Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008 See http://www.neuron.yale.edu/credits.html loading membrane mec...
by pfortier
Wed Feb 22, 2012 9:58 pm
Forum: Getting started
Topic: access data of graph
Replies: 2
Views: 2927

access data of graph

If I code ... objectvar g g = new Graph(0) g.addexpr("soma.v(.5)") graphList.append(g) then the voltage will be displayed as the simulation runs. Are the x and y data used for this plot available? I know I can save the time and voltage in vectors and then plot them in a graph but I was wondering whe...
by pfortier
Sun Feb 12, 2012 12:56 pm
Forum: Getting started
Topic: why: newPlotV() != new Graph()
Replies: 3
Views: 1738

Re: why: newPlotV() != new Graph()

Yes.

I just figured out that if I use:

Code: Select all

gV = new Graph()
graphList.append(gV)
then it correctly displays the trace. So I guess that only Graph[s] in the graphList get updated.
by pfortier
Sun Feb 12, 2012 9:24 am
Forum: Getting started
Topic: why: newPlotV() != new Graph()
Replies: 3
Views: 1738

why: newPlotV() != new Graph()

Why is newPlotV() g=graphItem not the same as g=new Graph() When I look at the display, I see that newPlotV() creates a voltage plot with the object stored in graphItem which I can copy to g. The same thing appears to occur with g=new Graph(). However, they are not interchangable as shown in the cod...
by pfortier
Mon Jan 10, 2011 6:46 pm
Forum: Other questions
Topic: section as parameter for procedure
Replies: 3
Views: 1007

Re: section as parameter for procedure

I now see that your response is directly derived from the documentation. Most clearly for SectionRef. I have been using "sectionname { stmt }" or else "sectionname stmt" format but it didn't click in my mind that I could use my own procedure as a stmt such as "sectionname testsection()". I have to r...
by pfortier
Fri Jan 07, 2011 4:10 pm
Forum: Other questions
Topic: section as parameter for procedure
Replies: 3
Views: 1007

section as parameter for procedure

I want to create a procedure that will do some tests on a section. Here is fake code (it does nothing meaningful) with the least code to highlight the problem. proc testsection() { localobj mysection mysection=$o1 } objref cell cell = new celltemplate() // template contains soma and dend[99] access ...
by pfortier
Thu Nov 04, 2010 10:52 pm
Forum: Other questions
Topic: pass &gkbar_hh to a func
Replies: 1
Views: 807

pass &gkbar_hh to a func

If I define param=4 then I can pass it's address to a function test(&param) but it fails when I try to pass &gkbar_hh as in test(&gkbar_hh) and test(&soma.gkbar_hh). Is there a way to pass the address of a RANGE variable?
by pfortier
Wed Oct 13, 2010 1:22 pm
Forum: Other questions
Topic: hoc pointer to variable
Replies: 1
Views: 869

hoc pointer to variable

I'd can't seem to get Pointer(&x) to work. I tested objref arrow age=33 arrow = Pointer(&age) but it doesn't work. I'm testing it to see if I can use it. Ultimately, I'm trying to find a way to have an array with elements that point to different variables (defined in hoc or mod files) so that I can ...
by pfortier
Wed May 26, 2010 10:39 am
Forum: Other questions
Topic: .label(x, y, "label") in axes coordinates
Replies: 2
Views: 2516

Re: .label(x, y, "label") in axes coordinates

To place a label aligned on axis coordinates, the following code seems to work well. // labelcoordinate=lblxy(xORyCase,graph,axiscoordinate): converts axis to label coordinate func lblxy() { return $o2.view_info(0, $1, $3)+$3 } objref g g = new Graph() g.size(0,100,0,100) g.label(lblxy(11, g, 20), l...
by pfortier
Sun Jun 07, 2009 4:45 pm
Forum: Other questions
Topic: .label(x, y, "label") in axes coordinates
Replies: 2
Views: 2516

.label(x, y, "label") in axes coordinates

To plot the voltage vectors of an n*m sheet of cells, I set gobj.size() to accommodate n*m vectors, offset the (x,y) values of each vector accordingly, and then use vector.line() to plot the data. I wanted to label my traces. I found graph.label(x, y, "label") but this uses window coordinates so whe...
by pfortier
Thu Apr 02, 2009 6:21 pm
Forum: Other questions
Topic: Is one set_seed enough?
Replies: 2
Views: 1714

Re: Is one set_seed enough?

Just after pressing submit, I realised that I could have tested it myself. So I appreciate your response. The results of my tests are that there is only 1 random number generator so I only need to set_seed once. Hopefully, I did it right. So this would be different from Random() since the manual sta...
by pfortier
Sat Mar 28, 2009 5:11 pm
Forum: Other questions
Topic: Is one set_seed enough?
Replies: 2
Views: 1714

Is one set_seed enough?

I have 5 neurons each with 3 different mechanisms (3 different mod files). Each mod file has a procedure to execute "set_seed(seed)" where argument seed is provided by the hoc file. So set_seed() is called with 5*3=15 different seed values. The mod files use either normrand() or scop_random() to get...
by pfortier
Sun Mar 15, 2009 12:14 pm
Forum: Other questions
Topic: adding new template slows down
Replies: 7
Views: 2197

Re: adding new template slows down

Simplicity can be very attractive. I would not have ended up with this code had I based it on IClamp (stim.mod) because it uses at_time(). I had to do some reading to figure out what net_send(), NET_RECEIVE() and flag were. Thank you very much, it works great. To summarize, I started with a working ...