Search found 215 matches

by ramcdougal
Fri Mar 09, 2012 1:13 pm
Forum: NEURON + Python
Topic: passing strdef from python and List.browser
Replies: 1
Views: 1635

Re: passing strdef from python and List.browser

Pure Python version, thanks to mctavish:

Code: Select all

from neuron import h, gui

listbox = h.List()
for i in xrange(3):
    listbox.append(h.Random())
listbox.browser('title', lambda: 'obj %d' % h.hoc_ac_)
by ramcdougal
Wed Mar 07, 2012 5:39 pm
Forum: NEURON + Python
Topic: passing strdef from python and List.browser
Replies: 1
Views: 1635

passing strdef from python and List.browser

Is there a way to work with strdefs in the abstract in python without them being evaluated to a particular value? For example, the List object's browser method takes a strdef and a function that is called repeatedly which is supposed to change the strdef to define list labels. In the following code,...
by ramcdougal
Fri Nov 04, 2011 1:33 pm
Forum: Other questions
Topic: arc3d distance
Replies: 1
Views: 1494

arc3d distance

According to The NEURON Book page 109, arc3d(i) is the anatomical distance of the ith 3-D point from the 0 end of the section. I think the following code constructs two sections s1 and s2, makes s2 a child of s1 whose 1 end is connected to s1's 1 end, and then prints their x, y, z, and arc length va...
by ramcdougal
Wed Sep 07, 2011 1:00 pm
Forum: UNIX/Linux
Topic: building interviews
Replies: 1
Views: 4287

building interviews

I tried building interviews from scratch on a mostly standard Ubuntu system. I had to install libx11-dev, but otherwise I basically just cloned the hg repository, ran build.sh, configure, then make. Make fails at the step: /bin/bash ../../../libtool --mode=link g++ -g -O2 -o idraw idarrow.o idarrowh...
by ramcdougal
Tue Oct 06, 2009 2:01 am
Forum: Other questions
Topic: overlaid range variable plots
Replies: 5
Views: 2379

Re: overlaid range variable plots

RangeVarPlots will respect Keep Lines if you add them to the flush_list and display them using h.flushPlot() (but not w.flush()). My final working code is w=h.Graph() # create graph window w.size(-totalLength*.05, totalLength, -.0001, .002) # set axes stick.push() cai_rvp=h.RangeVarPlot('cai') cai_r...
by ramcdougal
Mon Oct 05, 2009 3:56 pm
Forum: Other questions
Topic: overlaid range variable plots
Replies: 5
Views: 2379

Re: overlaid range variable plots

I do not want smooth updates of RangeVarPlots. I want to see (effectively) RangeVarPlots for different time values overlapping each other, as in the first two code examples. The problem is that RangeVarPlot seems to ignore the keeplines property; even if you call .family(1), the previous lines disap...
by ramcdougal
Sun Oct 04, 2009 9:10 pm
Forum: Other questions
Topic: overlaid range variable plots
Replies: 5
Views: 2379

overlaid range variable plots

I want to plot the concentrations cai and ip3i versus position every plotEvery milliseconds, all on the same graph. I have some code that works, but it draws the lines manually and is not particularly elegant: w=h.Graph() w.size(0, totalLength, 0, 2) w.color(1) w.label('cai') w.color(2) w.label('ip3...
by ramcdougal
Sun Sep 13, 2009 12:55 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: mod file CVODE compatibility
Replies: 9
Views: 7929

Re: mod file CVODE compatibility

Thanks for clarifying about the K.

Can I safely include mod files without SOLVE statements without affecting the stability of the rest of the system?
by ramcdougal
Sat Sep 12, 2009 10:37 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: mod file CVODE compatibility
Replies: 9
Views: 7929

Re: mod file CVODE compatibility

I was looking at the same file earlier today. It seems like I can do without using any solve statements or state variables, as in: NEURON { SUFFIX nap USEION na READ ena WRITE ina RANGE gnabar,vhalf, K } UNITS { (mA) = (milliamp) (mV) = (millivolt) } PARAMETER { : parameters that can be entered when...
by ramcdougal
Wed Sep 09, 2009 9:06 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: cvode quirks
Replies: 1
Views: 1468

cvode quirks

I recently discovered from http://www.neuron.yale.edu/phpBB/viewtopic.php?f=16&t=489 that cvode should work with kinetic models (but does it work with LONGITUDINAL_DIFFUSION?) My first couple attempts ended in mysterious "bus error(s)," so I decided to start over from the beginning, an...
by ramcdougal
Fri Jun 12, 2009 5:06 am
Forum: NEURON + Python
Topic: output windows in python
Replies: 2
Views: 2297

Re: output windows in python

I have a partial solution to my own question. I can open a shape plot and resize, etc... it entirely* in python by # ready shape plot h.newshapeplot() shapeWindow=h.fast_flush_list.object(h.fast_flush_list.count()-1) shapeWindow.size(-380.24,488.164,-624.858,170.347) shapeWindow.variable('cai') shap...
by ramcdougal
Thu Jun 11, 2009 11:09 pm
Forum: NEURON + Python
Topic: output windows in python
Replies: 2
Views: 2297

output windows in python

I have recently decided to learn the Python interface for Neuron. I decided the best way to learn would be to convert some of my old scripts from hoc to python. I came so close to being successful on my own, but I haven't been able to figure out how to control shape plots without invoking the hoc in...
by ramcdougal
Tue Mar 31, 2009 11:13 am
Forum: NEURON + Python
Topic: Neuron GUI with python?
Replies: 7
Views: 4867

Re: Neuron GUI with python?

Works great. Thanks.
by ramcdougal
Mon Mar 30, 2009 11:33 pm
Forum: NEURON + Python
Topic: Neuron GUI with python?
Replies: 7
Views: 4867

Re: Neuron GUI with python?

Sorry to resurrect an old conversation, but... Did anyone ever figure out a good way to get the gui from python? If I start with "nrngui -python" and get a python interpretor that way, everything works wonderfully, but what I want to do is: $ python Python 2.5.2 (r252:60911, Oct 5 2008, 19...
by ramcdougal
Mon Mar 30, 2009 2:31 pm
Forum: Parallel NEURON
Topic: multisplit checkbox preconditions
Replies: 4
Views: 2772

Re: multisplit checkbox preconditions

Hines tells me "Multisplit does not work with LONGITUDINAL_DIFFUSION."