Giter Site home page Giter Site logo

netpyneshowcase's Introduction

NetPyNE Showcase

Files for testing NetPyNE & NeuroML interactions. See here for more info.

Continuous builds Regenerate files

netpyneshowcase's People

Contributors

pgleeson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

netpyneshowcase's Issues

Test pipeline NetPyNE-> NeuroML-> other simulators...

@salvadord was asking about options for examples of models built in NetPyNE, converted to NeuroML and then run successfully in another simulator. For various reasons EDEN is currently the best option for trying this.

I've added various OMV tests for running the generated NeuroML equivalents of NetPyNE models in EDEN, and the results are good so far. See test files ending jnmleden.omt here, the results of these are at https://github.com/OpenSourceBrain/NetPyNEShowcase/runs/6374237602?check_suite_focus=true.

As an example this: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NetPyNE/HybridSmall/HybridSmall.py builds a small net with HH & Izhikevich cells, it gets generated to NML here: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/HybridSmall.net.nml (see here for generating script).
The LEMS simulation file generated also (https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/LEMS_HybridSmall.xml) can be used to generate a Python script which loads the NML using the latest jnml or pynml:

jnml LEMS_HybridSmall.xml  -eden
# or ...
pynml LEMS_HybridSmall.xml  -eden

# then ...
python LEMS_HybridSmall_eden.py

This is what gets tested in OMV files like: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/.test.hyizh.jnmleden.omt

cc @spanag

Point process cells connections working but can't test in showcase due to error

@pgleeson I tested connecting the Izhi07a (artificial cell) to HH and viceversa and it works. I added the code to the tut_import.py so you can try it yourself: https://github.com/Neurosim-lab/netpyne/blob/development/doc/source/code/tut_import.py

The key so that cells that don't use the section voltage work, is to specify in the 'vref' param what is the point process variable that will be used as voltage, eg. in the Izhi07a the variables is called 'V':
cellRule['secs']['soma']['pointps']['Izhi2007a_0']['vref'] = 'V' # specify that uses its own voltage V

I then changed my branch to the neuroml_export and pulled, to try to test your code here: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/a239a2818a361610b64cccb92028b42c04948f45/NeuroML2/LEMS_Spikers_netpyne.py

However, I got the following error:

Salvador-Duras-MacBook-Pro% ipython -i LEMS_Spikers_netpyne.py
Python 2.7.12 |Anaconda 2.0.1 (x86_64)| (default, Jul 2 2016, 17:43:17)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
NEURON -- VERSION 7.5 (1454:2350fc838a79) 2016-08-01
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits

Running a NetPyNE based simulation for 1000.0ms (dt: 0.024999999ms) at 6.3 degC
Importing NeuroML 2 network from: Spikers.net.nml
Parsing: Spikers.net.nml
Loaded: Spikers.net.nml as NeuroMLDocument
INFO:DefaultNetworkHandler:Document: Spikers
INFO:DefaultNetworkHandler:Network: Spikers

TypeError Traceback (most recent call last)
/u/salvadord/Documents/ISB/Models/NetPyNEShowcase/NeuroML2/LEMS_Spikers_netpyne.py in ()
85 print("Running a NetPyNE based simulation for %sms (dt: %sms) at %s degC"%(simConfig.duration, simConfig.dt, h.celsius))
86
---> 87 gids = sim.importNeuroML2SimulateAnalyze(nml2_file_name,simConfig)
88
89 print("Finished simulation")

/u/salvadord/Documents/ISB/Models/netpyne_repo/netpyne/wrappers.pyc in importNeuroML2SimulateAnalyze(fileName, simConfig)
141 def importNeuroML2SimulateAnalyze(fileName, simConfig):
142
--> 143 return sim.importNeuroML2(fileName, simConfig)

/u/salvadord/Documents/ISB/Models/netpyne_repo/netpyne/simFuncs.py in importNeuroML2(fileName, simConfig)
2196 currParser = NeuroMLXMLParser(nmlHandler) # The XML handler knows of the structure of NeuroML and calls appropriate functions in NetworkHandler
2197
-> 2198 currParser.parse(fileName)
2199
2200 nmlHandler.finalise()

/u/salvadord/anaconda/lib/python2.7/site-packages/neuroml/hdf5/NeuroMLXMLParser.pyc in parse(self, filename)
53 self.netHandler.handlePopulation(population.id,
54 population.component,
---> 55 len(population.instances))
56 for inst in population.instances:
57

TypeError: handlePopulation() takes exactly 5 arguments (4 given)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.