pynn_brainscales.brainscales2.Population
-
class
pynn_brainscales.brainscales2.Population(*args, **kwargs) Bases:
pyNN.common.populations.Population,pygrenade_vx.network.abstract.frontend.ExperimentElementA 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=100withstructure=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.Structureinstance, 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__(*args, **kwargs) Create a population of neurons all of the same type.
Methods
__init__(*args, **kwargs)Create a population of neurons all of the same type.
add_to_input_data(experiment, …)Add element to experiment snippet’s input data.
add_to_topology(experiment)Add element to experiment snippet’s topology.
describe(*args, **kwargs)Returns a human-readable description of the population.
extract_output_data(experiment)Extract output data of element from experiment snippet.
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
-
property
actual_hwparams
-
add_to_input_data(experiment: pygrenade_vx.network.abstract.frontend.ExperimentSnippet, snippet_begin_time, snippet_end_time) Add element to experiment snippet’s input data.
If the snippet doesn’t contain the element yet, it is added. If it is already contained it is updated, if changed_input_data is True. The method is called after mapping is available.
- Parameters
experiment – Experiment snippet for which to add this element into the snippet’s input data
snippet_begin_time – Time at which the snippet begins
snippet_end_time – Time at which the snippet ends
-
add_to_topology(experiment: pygrenade_vx.network.abstract.frontend.ExperimentSnippet) Add element to experiment snippet’s topology.
If the snippet doesn’t contain the element yet, it is added. If it is already contained it is updated, if changed_topology is True. This method is called before the potential mapping operation.
- Parameters
experiment – Experiment snippet for which to add this element into the snippet’s topology
- Returns
Whether the element was added to the topology. The experiment doesn’t track interdependencies defining the order in which the elements can be added to the topology. Therefore this method is expected to perform the check whether the element can be added or updated, in which case the return value is expected to be True.
-
all_cells: numpy.ndarray
-
property
calib_hwparams
-
property
calib_target
-
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.
-
extract_output_data(experiment: List[pygrenade_vx.network.abstract.frontend.ExperimentSnippet]) Extract output data of element from experiment snippet. This method is called after execution of the experiment. Storage in the front end format is to be performed by the front end.
- Parameters
experiment – Experiment snippet from which to extract this element’s output data
-
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] = None, locations: Optional[List[str], None] = 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.