Event neural assembly Simulation


Purpose
Description
License
Disclaimer
Credits
Support

Documentation
Presentation
Class hierarchy
Class list
Class members
Examples
Design
Coding
References

Using It
Requirements
C/C++
Cluster
PHP/Apache
Java
Matlab
MVASpike
Python
PyNN
Scilab

Support
installation-problem
usage-problem/bug
question/suggestion

Package purpose
  • This set of classes allows to simulate and analyze so called "event neural assemblies".
  • It is designed mainly as
    • existing simulator plug-in (e.g. MVASpike or other simulators via the NeuralEnsemble meta-simulation platform),
    • additional modules for computations with neural unit assembly on standard platforms (e.g. Python or the Scilab platform).
  • Achievements include: spike trains statistical analysis via Gibbs distributions, spiking network programing for exact event's sequence restitution, discrete neural field parameters algorithmic adjustments and time-constrained event-based network simulation reconciling clock and event based simulation methods.
    Recent achievment: we are developing numerical tools for the analysis of spike trains. They are based on the estimates of a polynomial Gibbs potential from spikes trains and subsequently the population firing rate, correlations, higher order statistics and relative entropy. They not only allow us to estimate the spikes statistics but also to compare different models, thus answering such questions about the neural code as: are correlations (or time synchrony or a given set of spike patterns,. . . ) significant with respect to rate coding?.
It is neither a new "simulator", nor a new "platform", but a set of new routines available for such existing tools.
Package description
  • The simulator itself is defined via the Network and Unit (e.g. a neuron with connections).
  • Utility routines (using either CImg or gnuplot for display and output) help analyzing the simulation
License:
The source code of the EnaS Library is to be distributed under the CeCiLL-C license.
This License is a Free-Software license, adapted to the distribution of library components. It is close in its terms to the LGPL license.
Such CeCill licenses have been created under the supervision of French computer science major institutions. They comply to international regulation rules.
This middleware is subject to an APP deposit.
Disclaimer:
This is an beta version still in development and subject to any change.
Use it, but help us test/improve it !
Credits:
Developed by several authors within the scope of the ANR MAPS and the EC IP FP6-015879 FACETS projects.
This is an INRIA product.
Requirements
  1. For standard numerical computation, the GSL (version >= 1.11) and GLPK (version >= 4.32) are used, in addition to the STL (gcc version >= 4.4) .
    • Simply
      install libstdc++-devel gsl-devel glpk-devel
      using yum or an equivalent installation tool.
      (also
      install libstdc++-static gsl-static glpk-static
      to produce static bin).
    while
    • To avoid using GSL/GLPK (and related routines !) introduce the -DNOGSL as compilation directive.
  2. For local plot and display,
    • Either have gnuplot (4.2.0 or latter) installed on your system,
    • Or download the CImg.h file and introduce -DCIMG as compilation directive,
    or both !
Using it with C/C++
  • Using it:
    1. No library. You simply have to download EnaS.h and insert:
      #include "EnaS.h"
      using namespace enas;
      in your C++ code to use it.
    2. In order to compile, use a commmand of the form
      g++ -Wall -lgsl -lgslcblas -lglpk -lm <other options>
      or use the standard makefile.inc, which usage is documented.
    3. In order to run/debug notice that
      • the sys::check(condition, .../...)allows to verify predicates during runtime, while
      • using make myprogram.gbd allows to check the code via gdb (with suitable minimal parameters), and
      • using make myprogram.mbd allows to check variables and memory allocation with valigrind (with suitable parameters).
  • You can also directly export the inc/(EnaS.h|makefile.inc|..) directory, if you enjoy the correct rights, using
    svn --force export svn+ssh://`whoami`@scm.gforge.inria.fr/svn/enas/inc
  • More:
    • Classes are defined in the enas namespace. Thus add using namespace enas; or prefix class names with enas::.
    • If you program in C rather than C++, simply use g++ to compile your C routines.
      The EnaS objects are to be called using the related C++ constructs, but your applicative code can be simple C.
    • You can follow the proposed examples to get started, with several tests available providing regression/installation tests.
  • Remark: Using the ``raw´´ #include "EnaS.h" method makes the code lightweight:
    Self-contained and easily portable (Unix/X11,Windows, MacOS X, FreeBSD,..), using the g++ processor.
    Extensively factorized (decomposed in small routines), without impairing execution time thanks to compiler in-lining mechanisms.
    Run-time optimized, as in-line code, when plugged in in other softwares.
    The price to pay is a tiny compilation time increase. This method is inspired by CImg.
Source distribution
  • Co-contributors are welcomed ! You simply need to:
    1. Register on the INRIA software forge and contact us.
    2. Check-out the open-source bundle: svn co svn+ssh://`whoami`@scm.gforge.inria.fr/svn/enas and participate.
  • If you contribute please pay attention to the and consider the way are managed.
  • More precisely:
    • Source codes are compiled using the strongest possible g++ pedantic style with additional constraints to be usable using swig while source codes are systematically beautified in order to impose a common coding style.
    • Coding is done using strong rules: constructors are minimal, parameter less (except for inner-class parent reference), with only basic initialization; parameters are defined via a reset() method (for constant values) or get/set methods; data-structure are implemented as containers, with iterators; static methods are packed up into ``factories´´ (classes with only static methods); system's interfaces are encapsulated in a sys set standard minimal routines.
    • Nothing existing ``elsewhere´´ is coded here, except wrappers to existing software components to ease their interface and male explicit how they are used.
Rpm Linux distribution
  • A RPM distribution is proposed to ease the installation under Linux: enas-0-09.noarch.rpm, according to the following specification
    • You simply have to download the RPM file and run as root : rpm -Uvh enas-*.noarch.rpm
Using it on a cluster
These routines have been have extensively be used on a cluster, using the MPI (e.g.: MPImain.c).
Here are commonly used commands and a configuration file, as very basic examples.
Using it with PHP/Apache for web-services

The safer and simpler solution is to write a executable and call it via a shell_exec, as illustrated in the proposed example, using the PHP Yava package Form class,


It also still possible to use SWIG PHP interface (tested but not distributed, use the source download)
Installation:
-1- The enas.so file is to be installed in the /usr/lib/php/modules PHP folder.
-2- The enas module is to be declared either in the php.ini as an extension using extension=enas.so,
or explicitly loaded in the PHP script using the dl("enas.so");.

Using it with Java
The source code has been carefully written in order to be wrapable using SWIG.
It is thus available as a Java shared object, nested classes being to rename (e.g. Imp::Iterator -> ImpIterator) and requiring template instantiation.
Furthermore, it is a ``Java-style´´ code as detailed in the design principles.
Installation:
-1- The libenas.so file is to be installed in the $LD_LIBRARY_PATH
-2- The enas.jar file is to be installed in the $CLASSPATH.
See the related documentation for more details.
Using it with MVASpike
The simulation mechanism is to be integrated in the next MVASpike release.
Using it with Matlab
Interface with matlab is rather heavy and requires specific code for each routine.
It can thus be done only on request ... and with some end-user help for the specification, beyond the documentation and tutorial.
A mat2txt.sh diagnose and perform double array extraction of matlab .mat files (in simple ascii format), then readable with Plot2D, allowing to gets the matlab data in EnaS.
An alternative open-source solution is to use Scilab ...
Using it via PyNN
The integration in NEURON and other simulators, via PyNN (though the Python wrapper) is planned within the scope of the FACETS project. Since MVASpike is wrapped to PyNN, integrating these routines in MVASpike will provide the expected bridge.
Using it with Python
The source code has been carefully written in order to be wrapable using SWIG.
It is thus available as a Python shared object, nested classes being to rename (e.g. Imp::Iterator -> ImpIterator) and requiring template instantiation.
Installation:
-1- The _enas.so file is to be installed in the lib-dynload Python folder.
-2- The enas.py file is to be installed in the site-packages Python folder.
Using it with Scilab
The scilab environment has a built-in C interface with limited but easy to use features.
In this context, the EnaS classes are not called directly, whereas the user is asked to write intermediate C routine of its convenience, say a name.c file containing a name(...) routine. Wrapping is then obvious:
Routines are wrapped via the
ilib_for_link("name", "name.c", ["gsl", "gslcblas", ...], "c", "Makelib", "loader.sce", "", "", "", ", "g++")
exec loader.sce
constructs.
Routines are called via the
call("name", arg, ...)
construct, calling the name(arg, ...) routine, with ``matrix´´ (i.e. double* or int*) or ``string´´ (i.e. char*) as arguments.
See the documentation for more information.

Event Neural Assembly (enas) © inria.fr (release: 2010-02-07 at 01:03:38)