pynn_brainscales.brainscales2.Population

class pynn_brainscales.brainscales2.Population(size, cellclass, cellparams=None, structure=None, initial_values={}, label=None)

Bases: pyNN.common.populations.Population

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 to size=100 with structure=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

describe(*args, **kwargs)

Returns a human-readable description of the population.

find_units(variable)

Returns units of the specified variable or parameter, as a string.

get_plasticity_data(observable)

Get recorded observable data for this population from plasticity rule. :raises RuntimeError: On no plasticity rule or requested observable name present :param observable: Observable name to get data for :returns: Observable data per plasticity rule execution period per neuron.

record(variables[, to_file, …])

Record the specified variable or variables for all cells in the Population or view.

Attributes

actual_hwparams

calib_hwparams

calib_target

changed_since_last_run

property actual_hwparams
all_cells: numpy.ndarray
property calib_hwparams
property calib_target
changed_since_last_run = True
describe(*args, **kwargs)

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.

find_units(variable)

Returns units of the specified variable or parameter, as a string. Works for all the recordable variables and neuron parameters of all standard models.

get_plasticity_data(observable: str)

Get recorded observable data for this population from plasticity rule. :raises RuntimeError: On no plasticity rule or requested observable

name present

Parameters

observable – Observable name to get data for

Returns

Observable data per plasticity rule execution period per neuron

record(variables: Union[str, List[str]], to_file: Optional[Union[str, neo.io.nixio.NixIO]] = None, sampling_interval: Optional[float] = None, locations: Optional[List[str]] = None, *, device: str = 'madc')None

Record the specified variable or variables for all cells in the Population or view.

Parameters
  • variables – may be either a single variable name or a list of variable names. For a given celltype class, celltype.recordable contains a list of variables that can be recorded for that celltype. To reset recording of PopulationView or Population call record with “None” as argument.

  • to_file – If specified, variables are written to file when pynn.end() is called. For more details see :py:function::pynn.population.write_data or pyNN-Doc <https://neuralensemble.org/docs/PyNN/data_handling.html>

  • sampling_interval – Feature not yet implemented.

  • locations – Defines where the variables should be recorded. Used with multi-compartment neurons where location is defined by label.

  • device – Configures device which is used to record recordables. Default is set to “madc”. Use as device “pad_[0/1]_[unbuffered/buffered]” to connect recordables of neurons to pads. Each of the 2 pads can be connected to one neuron. For limitations see documentation.