pynn_brainscales.brainscales2.simulator.Population
-
class
pynn_brainscales.brainscales2.simulator.
Population
(size, cellclass, cellparams=None, structure=None, initial_values={}, label=None) Bases:
pyNN.common.populations.BasePopulation
A group of neurons all of the same type. “Population” is used as a generic term intended to include layers, columns, nuclei, etc., of cells.
- Arguments:
- size:
number of cells in the Population. For backwards-compatibility, size may also be a tuple giving the dimensions of a grid, e.g.
size=(10,10)
is equivalent tosize=100
withstructure=Grid2D()
.- cellclass:
a cell type (a class inheriting from
pyNN.models.BaseCellType
).- cellparams:
a dict, or other mapping, containing parameters, which is passed to the neuron model constructor.
- structure:
a
pyNN.space.Structure
instance, used to specify the positions of neurons in space.- initial_values:
a dict, or other mapping, containing initial values for the neuron state variables.
- label:
a name for the population. One will be auto-generated if this is not supplied.
-
__init__
(size, cellclass, cellparams=None, structure=None, initial_values={}, label=None) Create a population of neurons all of the same type.
Methods
__init__
(size, cellclass[, cellparams, …])Create a population of neurons all of the same type.
describe
([template, engine])Returns a human-readable description of the population.
id_to_index
(id)Given the ID(s) of cell(s) in the Population, return its (their) index (order in the Population).
Given the ID(s) of cell(s) in the Population, return its (their) index (order in the Population), counting only cells on the local MPI node.
Attributes
An array containing cell ids for the local node.
A 3xN array (where N is the number of neurons in the Population) giving the x,y,z coordinates of all the neurons (soma, in the case of non-point models).
The spatial structure of the Population.
-
describe
(template='population_default.txt', engine='default') Returns a human-readable description of the population.
The output may be customized by specifying a different template together with an associated template engine (see
pyNN.descriptions
).If template is None, then a dictionary containing the template context will be returned.
-
id_to_index
(id) Given the ID(s) of cell(s) in the Population, return its (their) index (order in the Population).
>>> assert p.id_to_index(p[5]) == 5
-
id_to_local_index
(id) Given the ID(s) of cell(s) in the Population, return its (their) index (order in the Population), counting only cells on the local MPI node.
-
property
local_cells
An array containing cell ids for the local node.
-
property
positions
A 3xN array (where N is the number of neurons in the Population) giving the x,y,z coordinates of all the neurons (soma, in the case of non-point models).
-
property
structure
The spatial structure of the Population.