Search found 15 matches

by emuller
Wed Jul 15, 2009 3:29 am
Forum: OS X
Topic: Unable to install for Mac OS X 10.5
Replies: 3
Views: 2569

Re: Unable to install for Mac OS X 10.5

The most recent OS X installers available from http://www.neuron.yale.edu/neuron/install/install.html should now work with newer versions of EPD. Please give it a try and let me know.
by emuller
Tue Mar 31, 2009 6:13 am
Forum: NEURON + Python
Topic: Neuron GUI with python?
Replies: 7
Views: 4213

Re: Neuron GUI with python?

Generally, at least since NEURON 7.0, one can do the following:

$ python
>>> from neuron import gui

And the GUI will appear.

See:
https://www.neuron.yale.edu/phpBB2/view ... 1405#p5213
by emuller
Sat Jan 03, 2009 8:27 am
Forum: NEURON + Python
Topic: iPython, gtk, qt, tk
Replies: 2
Views: 1967

Re: iPython, gtk, qt, tk

Running the Interviews GUI in ipython is possible with the 7.0 alpha development code, by doing the following: $ ipython ... In [1]: from neuron import h NEURON -- VERSION 7.0 (228: fbb244f333a9 ) 2008 -11 -25 Duke , Yale , and the BlueBrain Project -- Copyright 1984 -2007 See http :// www . neuron ...
by emuller
Tue Sep 16, 2008 5:16 am
Forum: NEURON + Python
Topic: ParallelPython and Neuron
Replies: 3
Views: 2690

Re: ParallelPython and Neuron

You might also try the interactive distributed features of Ipython (formerly Ipython1, http://ipython.scipy.org/moin/) I have looked at ParallelPython before, but I find ipython1 more powerful. Also, it might be interesting to know that ipython supports mpiexec to execute python on each slave node, ...
by emuller
Fri Aug 22, 2008 1:50 pm
Forum: NEURON + Python
Topic: Better conductance input idiom?
Replies: 1
Views: 2224

Better conductance input idiom?

Is there a better way to play a specified conductance input than what I'm doing below? # create an SEClamp object which is accessible in both python and NEURON soma.push() h('objref estim') h('estim = new SEClamp(0.5)') h.pop_section() estim = h.estim # Create a stimulus Vector rs_exc = neuron.Vecto...
by emuller
Fri Aug 22, 2008 1:45 pm
Forum: NEURON + Python
Topic: Two instances of Neuron in a Python script
Replies: 1
Views: 1357

Re: Two instances of Neuron in a Python script

Modules in python are singleton. Therefore, all references made in a running program are to the same module.

As a result, neuron.h is one and the same object each time you import it in the constructor.
by emuller
Thu Mar 27, 2008 8:34 am
Forum: NEURON + Python
Topic: Numpy?
Replies: 19
Views: 9682

Making all in e_editor make[3]: Entering directory `/home/gartland/neuron/nrnpy/src/e_editor' if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpytho...
by emuller
Wed Mar 26, 2008 7:19 am
Forum: NEURON + Python
Topic: Numpy?
Replies: 19
Views: 9682

The nrnpy trunk (http://neuralensemble.org/trac/nrnpy) now contains code for optimized conversion of Hoc Vectors to numpy arrays. In [10]: a = numpy.arange(0,10.0,0.00001) In [11]: v = neuron.Vector(a) In [12]: t1 = time.time(); a = numpy.array(v); t2 = time.time();print t2-t1 0.0429871082306 These ...
by emuller
Wed Mar 19, 2008 8:01 am
Forum: NEURON + Python
Topic: Numpy?
Replies: 19
Views: 9682

After looking into the numpy.array function, I've changed my mind regarding the creation of toarray, fromarray functions. In [17]: a = numpy.array() In [18]: ? a.__array__ Type: builtin_function_or_method Base Class: <type 'builtin_function_or_method'> String Form: <built-in method __array__ of nump...
by emuller
Wed Mar 19, 2008 6:31 am
Forum: NEURON + Python
Topic: Numpy?
Replies: 19
Views: 9682

I would like to point out that the class neuron.Vector already has a complete interface to play with numpy: In [1]: import neuron NEURON -- VERSION 6.2.11 (40) 2008-02-04 (40M) Duke, Yale, and the BlueBrain Project -- Copyright 1984-2007 See http://www.neuron.yale.edu/credits.html In [2]: l = [1,2,3...
by emuller
Tue Mar 18, 2008 10:00 am
Forum: NEURON + Python
Topic: Numpy?
Replies: 19
Views: 9682

I have just attempted a build from a recent SVN revision, and confirm that numpy support is currently broken. I will fix it and submit a patch shortly. However, presently the following should work: import numpy import neuron v = neuron.Vector(10) a = numpy.array(v) print repr(a) # out: array([ 0., 0...
by emuller
Mon Mar 17, 2008 12:10 pm
Forum: NEURON + Python
Topic: Compling Problem
Replies: 21
Views: 16379

Re: no module named hoc

after make install I switched to the src/nrnpython dir and typed python setup.py install in super user mode: ... Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import neuron Tra...
by emuller
Fri Jun 08, 2007 3:29 am
Forum: NEURON + Python
Topic: Using nrniv with IPython
Replies: 10
Views: 9380

The big question in my mind is: how can I get python to load a dll which wasn't built for python ... I guess something from ctypes would help here. in neuron.py we could define something like: def load_mechanism(dll_file): import ctypes dll = ctypes.CDLL(dll_file) hoc.register_py_dll(dll) then regis...
by emuller
Fri Jun 08, 2007 3:14 am
Forum: NEURON + Python
Topic: Using nrniv with IPython
Replies: 10
Views: 9380

Re: NEURON as a python module

would an nrn.load_dll(path_to_so) be provided so external mechanisms can be loaded? This sounds like a good idea to me, however I must admit I don't know the specifics of NEURON's mechanism loader. We did have some problems getting pynest to dynamically load external mechanisms, but we were trying ...
by emuller
Mon Oct 02, 2006 5:25 am
Forum: NEURON + Python
Topic: Using nrniv with IPython
Replies: 10
Views: 9380

NEURON as a python module

Are plans to eventually provide neuron as a python module?

i.e:

ipython -pylab

>>> import nrn
>>> ...

What would be the limitations, if any, in taking this route?

cheers,

Eilif