Exemplo n.º 1
0
#!/usr/bin/env python
# Author Michele Mattioni
# Fri Apr  9 11:35:29 BST 2010
"""Main script to start Neuronvisio"""

from neuronvisio.controls import Controls
import sys

if __name__ == '__main__':

    controls = Controls()
    if len(sys.argv) == 2:
        controls.load(sys.argv[1])
Exemplo n.º 2
0
This example comes with NeuronVisio.
Cell model taken from the paper:

NEURON and Python
Hines et al.
Frontiers in Neuroinformatics 
(2009)
DOI 10.3389/neuro.11/001.2009 

"""

from itertools import chain

# Importing Neuronvisio
from neuronvisio.controls import Controls
controls = Controls()

# Importing the hoc interpreter
from neuron import h

# topology
soma = h.Section(name='soma')
apical = h.Section(name='apical')
basilar = h.Section(name='basilar')
axon = h.Section(name='axon')

apical.connect(soma, 1, 0)
basilar.connect(soma, 0, 0)
axon.connect(soma, 0, 0)

# geometry
Exemplo n.º 3
0
#!/usr/bin/python
# Author Michele Mattioni
# Fri Apr  9 11:35:29 BST 2010
"""Main script to start Neuronvisio"""

from neuronvisio.controls import Controls
import sys

if __name__ == '__main__':

    controls = Controls()
    if len(sys.argv) == 2:
        controls.load_hdf(sys.argv[1])
Exemplo n.º 4
0
# This example comes with NeuronVisio.

# The model is the ported one from the NeuroML website
# http://www.neuroconstruct.org/samples/index.html#Ex6_CerebellumDemo-N101EA

# You need to compile the hoc file before launching it
# $ nrnivmodl 

# Importing Neuronvisio
from neuronvisio.controls import Controls
controls = Controls()

# loading the model
# importing the interview so the GUI does not freeze
# Uncomment this if you want to use also the interview GUI
#import neuron.gui

# Load the script
controls.load("Ex6_CerebellumDemo.hoc")

# Uncomment, or copy paste in the ipython console to record and run our vectors

# Record the voltage for all the sections
#controls.manager.add_all_vecRef('v')

# Initializing also our vectors
#controls.init()

# Run
#controls.run()
Exemplo n.º 5
0
#!/usr/bin/env python
# Author Michele Mattioni
# Fri Apr  9 11:35:29 BST 2010

"""Main script to start Neuronvisio"""

from neuronvisio.controls import Controls
import sys


if __name__ == '__main__':
    
    controls = Controls()
    if len(sys.argv) == 2:
        controls.load(sys.argv[1])
    
         
Exemplo n.º 6
0
# it.

# The model that I choose is: 
# A model of spike initiation in neocortical pyramidal neurons 
# Z. F. Mainen, J. Joerges, J. R. Huguenard and T. J. Sejnowski 
# Neuron 15, 1427-1439 (1995)

# From the original demo I deleted the synapses and the interview panel for clarity.


# You need to compile the hoc file before launching it
# $ nrnivmodl 

# Importing Neuronvisio
from neuronvisio.controls import Controls
controls = Controls()

# Importing hoc interpreter
from neuron import h

# loading the model
# importing the interview so the GUI does not freeze
# Uncomment this if you want to use also the interview GUI
#import neuron.gui

# Load the script
controls.load("demo.hoc")


## Insert an IClamp
st = h.IClamp(0.5, sec=h.soma)