Side classes

class nngt.Shape(parent=None)[source]

Class containing the shape of the area where neurons will be distributed to form a network.

area

double

Area of the shape in mm^2.

com

tuple of doubles

Position of the center of mass of the current shape.

add_subshape: void

Add a AGNet.generation.Shape to a preexisting one.

add_subshape(subshape, position, unit='mm')[source]

Add a AGNet.generation.Shape to the current one.

Parameters:
  • subshape (AGNet.generation.Shape) – Length of the rectangle (by default in mm).
  • position (tuple of doubles) – Position of the subshape’s center of gravity in space.
  • unit (string (default ‘mm’)) – Unit in the metric system among ‘um’, ‘mm’, ‘cm’, ‘dm’, ‘m’
Returns:

None

area
com
rnd_distrib(nodes=None)[source]
class nngt.NeuralPop(size=None, parent=None, with_models=True, **kwargs)[source]

The basic class that contains groups of neurons and their properties.

Variables:has_modelsbool, True if every group has a model attribute.
add_to_group(group_name, id_list)[source]
classmethod copy(pop)[source]

Copy an existing NeuralPop

classmethod ei_population(size, iratio=0.2, parent=None, en_model='aeif_cond_alpha', en_param={}, es_model='static_synapse', es_param={}, in_model='aeif_cond_alpha', in_param={}, is_model='static_synapse', is_param={})[source]

Make a NeuralPop with a given ratio of inhibitory and excitatory neurons.

has_models
is_valid
new_group(name, id_list, ntype=1, neuron_model=None, neuron_param={}, syn_model='static_synapse', syn_param={})[source]
classmethod pop_from_network(graph, *args)[source]

Make a NeuralPop object from a network. The groups of neurons are determined using instructions from an arbitrary number of GroupProperties.

set_model(model, group=None)[source]

Set the groups’ models.

Parameters:
  • model (dict) – Dictionary containing the model type as key (“neuron” or “synapse”) and the model name as value (e.g. {“neuron”: “iaf_neuron”}).
  • group (list of strings, optional (default: None)) – List of strings containing the names of the groups which models should be updated.
  • .. warning (:) – No check is performed on the validity of the models, which means that errors will only be detected when building the graph in NEST.
  • .. note (:) – By default, synapses are registered as “static_synapse”s in NEST; because of this, only the neuron_model attribute is checked by the has_models function: it will answer True if all groups have a ‘non-None’ neuron_model attribute.
set_param(param, group=None)[source]

Set the groups’ parameters.

Parameters:
  • param (dict) – Dictionary containing the model type as key (“neuron” or “synapse”) and the model parameter as value (e.g. {“neuron”: {“C_m”: 125.}}).
  • group (list of strings, optional (default: None)) – List of strings containing the names of the groups which models should be updated.
  • .. warning (:) – No check is performed on the validity of the parameters, which means that errors will only be detected when building the graph in NEST.
size
classmethod uniform_population(size, parent=None, neuron_model='aeif_cond_alpha', neuron_param={}, syn_model='static_synapse', syn_param={})[source]

Make a NeuralPop of identical neurons