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='iaf_neuron', en_param={}, es_model='static_synapse', es_param={}, in_model='iaf_neuron', 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_models(models=None)[source]
size
classmethod uniform_population(size, parent=None, neuron_model='iaf_neuron', neuron_param={}, syn_model='static_synapse', syn_param={})[source]

Make a NeuralPop of identical neurons