spynnaker8.models.populations package

Module contents

Populations are objects that contain groups of neurons.

Deprecated since version 6.0: Use spynnaker.pyNN.models.populations instead.

class spynnaker8.models.populations.Assembly(*populations, **kwargs)[source]

Bases: spynnaker.pyNN.models.populations.assembly.Assembly

A group of neurons, may be heterogeneous, in contrast to a Population where all the neurons are of the same type.

Deprecated since version 6.0: Use spynnaker.pyNN.models.populations.Assembly instead.

Parameters:
  • populations (Population or PopulationView) – the populations or views to form the assembly out of
  • kwargs – may contain label (a string describing the assembly)
class spynnaker8.models.populations.Population(size, cellclass, cellparams=None, structure=None, initial_values=None, label=None, constraints=None, additional_parameters=None)[source]

Bases: spynnaker.pyNN.models.populations.population.Population

PyNN 0.9 population object.

Deprecated since version 6.0: Use spynnaker.pyNN.models.populations.Population instead.

Parameters:
  • size (int) – The number of neurons in the population
  • cellclass (type or AbstractPyNNModel) – The implementation of the individual neurons.
  • cellparams (dict(str,object) or None) – Parameters to pass to cellclass if it is a class to instantiate. Must be None if cellclass is an instantiated object.
  • structure (BaseStructure) –
  • initial_values (dict(str,float)) – Initial values of state variables
  • label (str) – A label for the population
  • constraints (list(AbstractConstraint)) – Any constraints on how the population is deployed to SpiNNaker.
  • additional_parameters (dict(str, ..)) – Additional parameters to pass to the vertex creation function.
class spynnaker8.models.populations.PopulationView(parent, selector, label=None)[source]

Bases: spynnaker.pyNN.models.populations.population_view.PopulationView

A view of a subset of neurons within a Population.

In most ways, Populations and PopulationViews have the same behaviour, i.e., they can be recorded, connected with Projections, etc. It should be noted that any changes to neurons in a PopulationView will be reflected in the parent Population and vice versa.

It is possible to have views of views.

Note

Selector to Id is actually handled by AbstractSized.

Deprecated since version 6.0: Use spynnaker.pyNN.models.populations.PopulationView instead.

Parameters:
  • parent (Population or PopulationView) – the population or view to make the view from
  • selector (None or slice or int or list(bool) or list(int) or ndarray(bool) or ndarray(int)) –

    a slice or numpy mask array. The mask array should either be a boolean array (ideally) of the same size as the parent, or an integer array containing cell indices, i.e. if p.size == 5 then:

    PopulationView(p, array([False, False, True, False, True]))
    PopulationView(p, array([2, 4]))
    PopulationView(p, slice(2, 5, 2))
    

    will all create the same view.

  • label (str) – A label for the view