For empirically-based simulations of neurons and networks of neurons in Python.
This is the top-level module of the official python interface to the NEURON simulation environment (http://neuron.yale.edu/neuron/).
Documentation is available in the docstrings.
For a list of available names, try dir(neuron).
Example:
$ ipython In [1]: import neuron NEURON -- VERSION 6.2 2008-08-22 Duke, Yale, and the BlueBrain Project -- Copyright 1984-2007 See http://neuron.yale.edu/credits.html
In [2]: neuron.h ?
For help on these useful functions, see their docstrings:
neuron.init, run, psection, load_mechanisms
neuron.h
The top-level Hoc interpreter.
Execute Hoc commands by calling h with a string argument:
>>> h('objref myobj') >>> h('myobj = new Vector(10)')All Hoc defined variables are accessible by attribute access to h.
Example:
>>> print h.myobj.x[9]Hoc Classes are also defined, for example:
>>> v = h.Vector([1,2,3]) >>> soma = h.Section()More help is available for the respective class by looking in the object docstring:
>>> help(h.Vector)
neuron.gui
Import this package if you are using NEURON as an extension to Python, and you would like to use the NEURON GUI.
If you are using NEURON with embedded python, "nrniv -python", use rather "nrngui -python" if you would like to use the NEURON GUI.
$Id: __init__.py,v 1.1 2008/05/26 11:39:44 hines Exp hines $
Class factory for subclassing h.anyclass. E.g. class MyList(hclass(h.List)):...
function init():
Initialize the simulation kernel. This should be called before a run(tstop) call.
Equivalent to hoc finitialize():
http://neuron.yale.edu/neuron/docs/help/neuron/neuron/nrnoc.html#finitialize
Search for and load NMODL mechanisms from the path given.
This function will not load a mechanism path twice.
The path should specify the directory in which nrnmodliv was run, and in which the directory 'i686' (or 'x86_64' or 'powerpc' depending on your platform) was created
Returns a Python-wrapped hoc class where the object does not need to be associated with a section.
doc - specify a docstring for the new hoc class
Returns a Python-wrapped hoc class where the object needs to be associated with a section.
doc - specify a docstring for the new pointprocess class
Return a ctypes object corresponding to the NEURON library.
Warning
This provides access to the C-language internals of NEURON and should be used with care.
return the specified object from the NEURON dlls.
Parameters: | name : string
type : None or ctypes type (e.g. ctypes.c_int)
|
---|
return the specified object from the NEURON dlls. helper for nrn_dll_sym(name, type). Try to find the name in either nrniv.dll or libnrnpython1013.dll
Return a HOC reference into a numpy array.
Parameters: | numpy_array : numpy.ndarray
index : int
.. warning:: :
.. warning:: :
|
---|
function psection(section):
Print info about section in a hoc format which is executable. (length, parent, diameter, membrane information)
See:
http://neuron.yale.edu/neuron/docs/help/neuron/neuron/nrnoc.html#psection
See also