Search found 160 matches

by ramcdougal
Thu Jun 26, 2014 12:35 am
Forum: Adding new mechanisms and functions to NEURON
Topic: add/omit a synapse for different iterations
Replies: 3
Views: 2723

Re: add/omit a synapse for different iterations

The safest way to avoid any risk of cross-contamination from multiple experiments is to run them independently in separate processes. Obviously, doing this manually is not a good use of your time. You could write a shell script that launches NEURON repeatedly with arguments indicating what simulatio...
by ramcdougal
Wed Jun 04, 2014 1:52 pm
Forum: Reaction-diffusion in NEURON
Topic: Basic modelling question
Replies: 7
Views: 14185

Re: Basic modelling question

As long as a species has a "name" and lives on an rxd.Region with nrn_region = 'i' (or 'o'), then its concentrations will respond to currents. You have a minor syntactic error: rxd.Region takes a list of sections; it does not accept a string. For example, you could do something like: from neuron imp...
by ramcdougal
Tue Dec 17, 2013 7:47 pm
Forum: NEURON + Python
Topic: nrnpython+matplotlib gui thread hangs
Replies: 1
Views: 3262

Re: nrnpython+matplotlib gui thread hangs

As of 7.4 (978), Python threads do not execute when the HOC interpreter is waiting for input. To do interactive matplotlib and interviews graphics simultaneously from HOC, simply run a two-line python wrapper. For example, test.hoc, below plots y = x ^ 2 in both Interviews and matplotlib windows: nr...
by ramcdougal
Sun Dec 23, 2012 11:31 pm
Forum: Other questions
Topic: NEURON distribution license
Replies: 3
Views: 3278

Re: NEURON distribution license

I was asked to share my thoughts. The grant guidelines are long, so here's a little more context: "There is no prescribed single license... however... reviewers will be instructed to evaluate dissemination plans relative to these goals," which includes providing a license that "permit[s] the commerc...
by ramcdougal
Fri Jun 01, 2012 11:19 pm
Forum: NEURON + Python
Topic: reset NEURON
Replies: 10
Views: 6531

Re: reset NEURON

This is an issue for me since every time I run my program in the same python interpreter, the hoc interpreter is not cleared and new sections are added to the previous ones. The workaround that always works is to create a class based on your model cell. An alternative strategy for non-interactive p...
by ramcdougal
Fri Mar 09, 2012 1:13 pm
Forum: NEURON + Python
Topic: passing strdef from python and List.browser
Replies: 1
Views: 1354

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: 1354

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: 1288

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: 3618

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: 2055

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: 2055

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: 2055

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: 7310

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: 7310

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: 1263

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, and I discovered...