More NEURON + Python resources

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

More NEURON + Python resources

Post by mctavish »

Here is a list of Python resources with NEURON.

Our Sage server equipped with NEURON is a nice resource for example code and recipes. It is a place to try NEURON and Python without installing either on your local machine. To use, visit https://nn.med.yale.edu:8000 and log in with a user id and password. Once on, visit the "Published" worksheets and click on the "Edit a copy" link to interact with them. In particular, the NEURON + Python Basics is a great place to start, and the Ball-and-stick examples describe many core methods and concepts. These worksheets also demonstrate some Matplotlib drawing routines. Feel free to publish your own useful examples!

The group at http://neuralensemble.org/ has many links including http://neuralensemble.org/trac/NeuroTools, http://neuralensemble.org/trac/PyNN and http://neuralensemble.org/trac/sumatra.

Visualization tools are also forthcoming. For 3D visualization, there are http://mattions.github.com/neuronvisio/ and https://github.com/tfoutz99/Neuron3D. The https://bitbucket.org/tommctavish/neuronpy or (easy_install neuronpy) library also contains a nice spike raster plotting class with cumulative histograms. A demo of this class is also available in the "SpikePlot demo" Sage worksheet.

In addition to Sumatra, the https://bitbucket.org/tommctavish/nrnproject is a template for new projects and wrapper for existing projects to put them under Mercurial source control. This template contains nice facilities to document your sources and create nice html or pdf documents of your project using Sphinx.
vellamike

Re: More NEURON + Python resources

Post by vellamike »

This is great thanks!
wjbeaver
Posts: 2
Joined: Wed Dec 15, 2010 10:30 am

Re: More NEURON + Python resources

Post by wjbeaver »

Have you released a NEURON spkg for Sage?
Nin
Posts: 41
Joined: Thu May 03, 2007 4:04 pm
Location: Institute of Science and Technology (IST Austria)
Contact:

Re: More NEURON + Python resources

Post by Nin »

Have you released a NEURON spkg for Sage?
To build the Neuron shared Python library in Sage you can:
1.- call the python scritp in /nrn/src/nrnpython/setup.py with the sage interpreter, like:

Code: Select all

# sage setup.py install
2.- Alternatively, change the Line 8 in the file setup.py. Where you find

Code: Select all

nrnpython_exec = "/usr/bin/python
replace by

Code: Select all

nrnpython_exec = "/usr/local/sage-version/local/lib/python/"
and then type:

Code: Select all

# python setup.py install

That should work!
wjbeaver
Posts: 2
Joined: Wed Dec 15, 2010 10:30 am

Re: More NEURON + Python resources

Post by wjbeaver »

Quite simple. Thanks!
Post Reply