sheets Package

This package contains the API defining the basic building block of mozaik models - sheets - and related concepts.

sheets Module

Module containing the implementation of sheets - one of the basic building blocks of mozaik models.

class mozaik.sheets.__init__.Sheet(model, parameters)

Bases: mozaik.core.BaseComponent

Sheet is an abstraction of a 2D continuouse sheet of neurons, roughly corresponding to the PyNN Population class with the added spatial structure.

The spatial position of all cells is kept within the PyNN Population object. Each sheet is assumed to be centered around (0,0) origin, corresponding to whatever excentricity the model is looking at. The internal representation of space is degrees of visual field. Thus x,y coordinates of a cell in all sheets correspond to the degrees of visual field this cell is away from the origin. However, the sheet and derived classes/methods are supposed to accept parameters in units that are most natural for the given parameter and recalculate these into the internal degrees of visual field representation.

As a rule of thumb in mozaik:
  • the units in visual space should be in degrees.
  • the units for cortical space should be in μm.
Other Parameters:
 

cell : ParameterSet

The parametrization of the cell model that all neurons in this sheet will have.

cell.model : str

The name of the cell model.

cell.params : ParameterSet

The set of parameters that the given model requires.

cell.initial_values : ParameterSet

It can contain a ParameterSet containing the initial values for some of the parameters in cell.params

mpi_safe : bool

Whether to set the sheet up to be reproducible in MPI environment. This is computationally less efficient that if it is set to false, but it will guaruntee the same results irrespective of the number of MPI process used.

artificial_stimulators : ParameterSet

Contains a list of ParameterSet objects, one per each direct_stimulator.DirectStimulator object to be created. Each contains a parameter ‘component’ that specifies which direct_stimulator.DirectStimulator to use, and a parameter ‘params’ which is a ParameterSet to be passed to that DirectStimulator.

name : str

Name of the sheet.

recorders : ParameterSet

Parametrization of recorders in this sheet. The recorders ParameterSet will contain as keys the names of the different recording configuration user want to have in this sheet. For the format of each recording configuration see notes.

Notes

Each recording configuration requires the following parameters:

variables
tuple of strings specifying the variables to measure (allowd values are: ‘spikes’ , ‘v’,’gsyn_exc’ , ‘gsyn_inh’ )
componnent
the path to the mozaik.sheets.population_selector.PopulationSelector class
params
a ParameterSet containing the parameters for the given mozaik.sheets.population_selector.PopulationSelector class
required_parameters = {'cell': {'model': <type 'str'>, 'initial_values': <class 'parameters.ParameterSet'>, 'params': <class 'parameters.ParameterSet'>}, 'recorders': <class 'parameters.ParameterSet'>, 'artificial_stimulators': <class 'parameters.ParameterSet'>, 'name': <type 'str'>, 'mpi_safe': <type 'bool'>}
setup_to_record_list()

Set up the recording configuration.

size_in_degrees()

Returns the x, y size in degrees of visual field of the given area.

pop

The PyNN population holding the neurons in this sheet.

add_neuron_annotation(neuron_number, key, value, protected=True)

Adds annotation to neuron at index neuron_number.

Parameters :

neuron_number : int

The index of the neuron in the population to which the annotation will be added.

key : str

The name of the annotation

value : object

The value of the annotation

protected : bool (default=True)

If True, the annotation cannot be changed.

get_neuron_annotation(neuron_number, key)

Retrieve annotation for a given neuron.

Parameters :

neuron_number : int

The index of the neuron in the population to which the annotation will be added.

key : str

The name of the annotation

Returns :

value : object

The value of the annotation

get_neuron_annotations()
describe(template='default', render=<function <lambda> at 0x61b3938>)
record()
get_data(stimulus_duration=None)

Retrieve data recorded in this sheet from pyNN in response to the last presented stimulus.

Parameters :

stimulus_duration : float(ms)

The length of the last stimulus presentation.

Returns :

segment : Segment

The segment holding all the recorded data. See NEO documentation for detail on the format.

prepare_artificial_stimulation(duration, offset, additional_stimulators)

Prepares the background noise and artificial stimulation for the population for the stimulus that is about to be presented.

Parameters :

duration : float (ms)

The duration of the stimulus that will be presented.

additional_stimulators : list

List of additional stimulators, defined by the experiment that should be applied during this stimulus.

offset : float (ms)

The current time of the simulation.

setup_artificial_stimulation()

Called once population is created. Sets up the background noise.

setup_initial_values()

Called once population is set. Set’s up the initial values of the neural model variables.

sheets.vision Module

This module contains implementation of vision related sheets.

class mozaik.sheets.vision.RetinalUniformSheet(model, parameters)

Bases: mozaik.sheets.Sheet

Retinal sheet corresponds to a grid of retinal cells (retinal ganglion cells or photoreceptors). It implicitly assumes the coordinate systems is in degress in visual field.

Other Parameters:
 

sx : float (degrees)

X size of the region.

sy : float (degrees)

Y size of the region.

density : int

Number of neurons along both axis.

required_parameters = {'sy': <type 'float'>, 'sx': <type 'float'>, 'density': <type 'int'>}
size_in_degrees()
class mozaik.sheets.vision.SheetWithMagnificationFactor(model, parameters)

Bases: mozaik.sheets.Sheet

A Sheet that has a magnification factor corresponding to cortical visual area. It interprets the coordinates system to be in degrees of visual field, but it allows for definition of the layer using parameters in cortical space. It offers number of functions that facilitate conversion between the underlying visual degree coordinates and cortical space coordinate systems using the magnification factor.

Other Parameters:
 

magnification_factor : float (μm/degree)

The magnification factor.

sx : float (μm)

X size of the region.

sy : float (μm)

Y size of the region.

required_parameters = {'sy': <type 'float'>, 'sx': <type 'float'>, 'magnification_factor': <type 'float'>}
vf_2_cs(degree_x, degree_y)

vf_2_cs converts the position (degree_x, degree_y) in visual field to position in cortical space (in μm) given the magnification_factor.

Parameters :

degree_x : float (degrees)

X coordinate of the position in degrees of visual field

degree_y : float (degrees)

Y coordinate of the position in degrees of visual field

Returns :

microm_meters_x,microm_meters_y : float,float (μm,μm)

Tuple with the coordinates in cortical space (μm)

cs_2_vf(micro_meters_x, micro_meters_y)

cs_2_vf converts the position (micro_meters_x, micro_meters_y) in cortical space to the position in the visual field (in degrees) given the magnification_factor

Parameters :

micro_meters_x : float (μm)

X coordinate of the position in μm of cortical space

micro_meters_y : float (μm)

Y coordinate of the position in μm of cortical space

Returns :

degrees_x,degrees_y : float,float (degrees,degrees)

Tuple with the coordinates in visual space (degrees)

dvf_2_dcs(distance_vf)

dvf_2_dcs converts the distance in visual space to the distance in cortical space given the magnification_factor

Parameters :

distance_vf : float (degrees)

The distance in visual field coordinates (degrees).

Returns :

distance_cs : float (μm)

Distance in cortical space.

size_in_degrees()

Returns the size of the sheet in cortical space (μm).

class mozaik.sheets.vision.VisualCorticalUniformSheet(model, parameters)

Bases: mozaik.sheets.vision.SheetWithMagnificationFactor

Represents a visual cortical sheet of neurons, randomly uniformly distributed in cortical space.

Other Parameters:
 

density : float (neurons/mm^2)

The density of neurons per square milimeter.

required_parameters = {'density': <type 'float'>}

sheets.population_selector Module

This module contains definition of the PopulationSelector API. It is used as mechanism for selecting subpopulations of neurons within Sheets. The most typical use is for selecting neurons for recordings, where a PopulationSelector can for example simulate the sampling of neurons when using a multi-electrode array of some specific spatial configuration.

class mozaik.sheets.population_selector.PopulationSelector(sheet, parameters)

Bases: mozaik.core.ParametrizedObject

The PopulationSelector specifies which cells should be selected from population.

It defines only one function: generate_idd_list_of_neurons that should return the list of selected neurons ids, based on the provided sheet and parameters.

Parameters :

parameters : ParameterSet

The dictionary of required parameters.

sheet : Sheet

The sheet from which to pick the neurons

generate_idd_list_of_neurons()

The abastract function that has to be implemented by each .PopulationSelector and has to return the list of selected neurons.

Returns :

ids : list

List of selected ids.

class mozaik.sheets.population_selector.RCAll(sheet, parameters)

Bases: mozaik.sheets.population_selector.PopulationSelector

This PopulationSelector selects all neurons in the sheet.

generate_idd_list_of_neurons()
class mozaik.sheets.population_selector.RCRandomN(sheet, parameters)

Bases: mozaik.sheets.population_selector.PopulationSelector

This PopulationSelector selects random specified number of neurons.

Other Parameters:
 

num_of_cells : int

The number of cells to be selected.

required_parameters = {'num_of_cells': <type 'int'>}
generate_idd_list_of_neurons()
class mozaik.sheets.population_selector.RCRandomPercentage(sheet, parameters)

Bases: mozaik.sheets.population_selector.PopulationSelector

This PopulationSelector select random percentage of the population.

Other Parameters:
 

percentage : float

The percentage of neurons to select.

required_parameters = {'percentage': <type 'float'>}
generate_idd_list_of_neurons()
class mozaik.sheets.population_selector.RCGrid(sheet, parameters)

Bases: mozaik.sheets.population_selector.PopulationSelector

This PopulationSelector assumes a grid of points (‘electrodes’) and includes the closest neuron to each point to the selected list.

Other Parameters:
 

size : float (micro meters of cortical space)

The size of the grid (it is assumed to be square) - it has to be multiple of spacing

spacing : float (micro meters of cortical space)

The space between two neighboring electrodes.

offset_x : float (micro meters of cortical space)

The x axis offset from the center of the sheet.

offset_y : float (micro meters of cortical space)

The y axis offset from the center of the sheet.

required_parameters = {'spacing': <type 'float'>, 'offset_x': <type 'float'>, 'offset_y': <type 'float'>, 'size': <type 'float'>}
generate_idd_list_of_neurons()

Previous topic

meta-workflow Package

Next topic

Authors and contributors

This Page