Package: teili
teiliteili, das /taɪli/, Swiss german diminutive for piece.This toolbox was developed to provide computational neuroscientists and neuromorphic engineers with a playground for implementing neural algorithms which are simulated usingbrian2.Please report issues via the gitlabissue tracker. You can find the documentationhere.By providing pre-defined neural algorithms, a contributing guide to create novel neural algorithms and an intuitive way to combine different aspects of those neural algorithms, e.g. plasticity, connectivity etc, we try to shorten the development time required to test and implement novel neural algorithms and hierarchically assemble them.
Furthermore, by providing an easy and modular way to construct those algorithms from the basic building blocks of computaton, e.g. neurons, synapses and EI-networks, we aim to promote the development of reproducible computational models and networks thereof.
Additionally we aim to reduce the gap between software simulation and specific hardware emulation/implementation by an easy way to switch neuron/synapse models in a highly complex building block of a developed neural algorithm.Getting StartedThis toolbox is still in its alpha phase, so if you want to use it, follow the install instructions below.
Please also contact the main contributors with feedback.Please look at the examples here:~/teiliApps/tutorials/after successfully installingteiliand ourDocumentationInstallationCreate a virtual environment usingconda# Replace myenv with the desired name for your virtual environmentcondacreate--namemyenvpython=3.7If you want to use a specific version, as needed e.g. to useCTXLCTLadd the particular python version to the conda environmentcondacreate--namemyenvpython=3.6.6Activate your conda environmentsourceactivatemyenvIf you want to use the stable release simply run:pip install teiliTo get all tutorials, unit tests and statically defined neuron and synapse models please run (simply inside your terminal)python -m teili.tools.generate_teiliAppsIf you want to work with the latest version ofteiliclone therepositoryordownloadthe tar.gz filegitclonehttps://gitlab.com/neuroinf/teili.gitNavigate to the parent folder containing the cloned repository or the downloadedtar.gzfilecd Downloads/Install teili using pip# Point pip to the location of the setup.pypipinstallteili/# or point pip to the downloaded tar.gz filepipinstallteili*.tar.gzThesetup.pywill by default create a folder in your home directory calledteiliApps(if you use the source files teiliApps will be automocally generated. In case of the stable release from pypi.org you need to manually call the function to generate teiliApps as described above).
This folder contains a selection of neuron and synapse models, example scripts, as well as unit tests.
Please run the unit tests to check if everything is working. As we test also plotting functionality of teili we generate and kill plotting windows which causes warnings.cd~/teiliApps/
python-munittestdiscoverunit_tests/If you run the above command and the last line statesRan 78 tests in 93.373 OK, everything is good. You are good to go!We would recommend usingiPythonwithSpyderorJupyteras IDE, but any other editior/IDE is fine as well.You probably need to use Linux if you want to use standalone code generation,
otherwise, Windows and Mac OSX works fine.Basic usagefrombrian2importmsfromteiliimportNeurons,Connectionsfromteili.models.neuron_modelsimportDPIfromteili.models.synapse_modelsimportDPISyn# how to create a Neuronnum_neurons=10refP=3*msNeuron1=Neurons(num_neurons,equation_builder=DPI(numInputs=1),refractory=refP,name='Neuron1')# how to create a SynapseSynapse1=Connections(Neuron1,Neuron1,equation_builder=DPISyn(),method='euler',name='Synapse1')For a more detailed explanation have a look at ourTutorialTutorialsPlease look at theNeuron & Synapse tutorial, which is located in~/teiliApps/tutorial/.
You can also use them to test your installation.
To run an example and test if eveything is working, run the following commandcd~/teiliApps/examples/
python3neuron_synapse_test.pyFor more examples and use cases have look at ourDocumentationBrian2 debugging tipsSimulation is not going as expected?Restart Python kernelAre all groups added to the network?Are all statevars initialized with the correct value? (e.g. Membrane potential with resting potential, not 0)Use group.print() in order to see the equationsUse connections.plot() in order to get a visualizationAuthorsSee here for alist of the authors.Licenseteiliis licenced under the MIT license, see theLICENSEfile.