Search found 267 matches
- Mon Jul 07, 2014 6:52 pm
- Forum: NEURON + Python
- Topic: A Python interface for NEURON using ctypes
- Replies: 2
- Views: 2726
Re: A Python interface for NEURON using ctypes
If you're using NEURON 7.3 or higher, neuron.nrn_dll() returns a ctypes object corresponding to the NEURON library. The main difficulty here is that the C API exists only informally; there is no documentation or promise of what functions will have a stable interface, but you are encouraged to poke a...
- Thu Jun 26, 2014 4:29 pm
- Forum: NEURON + Python
- Topic: Segfault when running long simulation with many neurons
- Replies: 3
- Views: 4025
Re: Segfault when running long simulation with many neurons
There is a subtle and unfortunate distinction between h.run and neuron.run. The full code of neuron.run (defined here ) is: def run(tstop): """ function run(tstop) Run the simulation (advance the solver) until tstop [ms] """ h('tstop = %g' % tstop) h('while (t < tstop) ...
- 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: 4120
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...
- Wed Jun 04, 2014 1:52 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Basic modelling question
- Replies: 7
- Views: 19831
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 ...
- Tue Dec 17, 2013 7:47 pm
- Forum: NEURON + Python
- Topic: nrnpython+matplotlib gui thread hangs
- Replies: 1
- Views: 4983
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...
- Sun Dec 23, 2012 11:31 pm
- Forum: Other questions
- Topic: NEURON distribution license
- Replies: 3
- Views: 4227
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...
- Fri Jun 01, 2012 11:19 pm
- Forum: NEURON + Python
- Topic: reset NEURON
- Replies: 10
- Views: 9944
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...
- Fri Mar 09, 2012 1:13 pm
- Forum: NEURON + Python
- Topic: passing strdef from python and List.browser
- Replies: 1
- Views: 1994
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_)
- Wed Mar 07, 2012 5:39 pm
- Forum: NEURON + Python
- Topic: passing strdef from python and List.browser
- Replies: 1
- Views: 1994
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,...
- Fri Nov 04, 2011 1:33 pm
- Forum: Other questions
- Topic: arc3d distance
- Replies: 1
- Views: 1884
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...
- Wed Sep 07, 2011 1:00 pm
- Forum: UNIX/Linux
- Topic: building interviews
- Replies: 1
- Views: 5116
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...
- Tue Oct 06, 2009 2:01 am
- Forum: Other questions
- Topic: overlaid range variable plots
- Replies: 5
- Views: 2828
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...
- Mon Oct 05, 2009 3:56 pm
- Forum: Other questions
- Topic: overlaid range variable plots
- Replies: 5
- Views: 2828
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...
- Sun Oct 04, 2009 9:10 pm
- Forum: Other questions
- Topic: overlaid range variable plots
- Replies: 5
- Views: 2828
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...
- Sun Sep 13, 2009 12:55 pm
- Forum: Adding new mechanisms and functions to NEURON
- Topic: mod file CVODE compatibility
- Replies: 12
- Views: 22524
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?
Can I safely include mod files without SOLVE statements without affecting the stability of the rest of the system?