Main module

For more details regarding the main classes, see:

NNGT

Neural Networks Growth and Topology analyzing tool.

Provides algorithms for
  1. growing networks
  2. analyzing their activity
  3. studying the graph theoretical properties of those networks

How to use the documentation

Documentation is not yet really available. I will try to implement more extensive docstrings within the code. I recommend exploring the docstrings using IPython, an advanced Python shell with TAB-completion and introspection capabilities. See below for further instructions. The docstring examples assume that numpy has been imported as np:

>>> import numpy as np

Code snippets are indicated by three greater-than signs:

>>> x = 42
>>> x = x + 1

Use the built-in help function to view a function’s docstring:

>>> help(nggt.GraphClass)

Available subpackages

core
Contains the main network classes. These are loaded in nngt at import so specifying nngt.core is not necessary
generation
Functions to generate specific networks
lib
Basic functions used by several sub-packages.
io
@todo: Tools for input/output operations
nest
NEST integration tools
growth
@todo: Growing networks tools
plot
plot data or graphs (@todo) using matplotlib and graph_tool

Utilities

show_config
@todo: Show build configuration
version
NNGT version string

Units

Functions related to spatial embedding of networks are using milimeters (mm) as default unit; other units from the metric system can also be provided:

  • um for micrometers
  • cm centimeters
  • dm for decimeters
  • m for meters

Main graph classes

class nngt.Graph(nodes=0, name='Graph', weighted=True, directed=True, libgraph=None, **kwargs)[source]

The basic class that contains a graph_tool.Graph and some of is properties or methods to easily access them.

Variables:
  • idint unique id that identifies the instance.
  • graphGraphObject main attribute of the class instance.
class nngt.SpatialGraph(nodes=0, name='Graph', weighted=True, directed=True, libgraph=None, shape=None, positions=None, **kwargs)[source]

The detailed class that inherits from Graph and implements additional properties to describe various biological functions and interact with the NEST simulator.

Variables:
  • shapeShape Shape of the neurons environment.
  • positionsnumpy.array Positions of the neurons.
  • graphGraphObject Main attribute of the class instance.
class nngt.Network(name='Graph', weighted=True, directed=True, libgraph=None, population=None, **kwargs)[source]

The detailed class that inherits from Graph and implements additional properties to describe various biological functions and interact with the NEST simulator.

Variables:
  • populationNeuralPop Object reparting the neurons into groups with specific properties.
  • graphGraphObject Main attribute of the class instance
  • nest_gidnumpy.array Array containing the NEST gid associated to each neuron; it is None until a NEST network has been created.
  • id_from_nest_gid – dict Dictionary mapping each NEST gid to the corresponding neuron index in the nngt.~Network
class nngt.SpatialNetwork(population, name='Graph', weighted=True, directed=True, shape=None, graph=None, positions=None, **kwargs)[source]

Class that inherits from Network and SpatialGraph to provide a detailed description of a real neural network in space, i.e. with positions and biological properties to interact with NEST.

Variables:
  • shapenngt.core.Shape Shape of the neurons environment.
  • positionsnumpy.array Positions of the neurons.
  • populationNeuralPop Object reparting the neurons into groups with specific properties.
  • graphGraphObject Main attribute of the class instance.
  • nest_gidnumpy.array Array containing the NEST gid associated to each neuron; it is None until a NEST network has been created.
  • id_from_nest_gid – dict Dictionary mapping each NEST gid to the corresponding neuron index in the nngt.~SpatialNetwork