ANNarchy 4.8.2
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • Reference
  • Core components
    • Population
    • Projection
    • Neuron
    • Synapse
    • Monitor
    • PopulationView
    • Dendrite
    • Network
  • Configuration
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
  • Simulation
    • simulate
    • simulate_until
    • step
    • parallel_run
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • STP
    • STDP
    • Hebb
    • Oja
    • IBCM
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • IO
    • save
    • load
    • save_parameters
    • load_parameters
  • Utilities
    • report
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions and Constants
    • add_function
    • functions
    • Constant
    • get_constant
  • Plotting
    • raster_plot
    • histogram
    • inter_spike_interval
    • coefficient_of_variation
    • population_rate
    • smoothed_rate
  • Callbacks
    • every
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter

On this page

  • PopulationView
    • Attributes
    • Methods
      • coordinates_from_rank
      • get
      • rank_from_coordinates
      • set
      • sum

PopulationView

core.PopulationView.PopulationView(self, population, ranks, geometry=None)

Container representing a subset of neurons of a Population.

Attributes

Name Description
attributes Returns a list of attributes of the original population.
geometry Geometry of the PopulationView (optional).
name Returns the name of the original population.
parameters Returns a list of constants of the original population.
population Original (full) population.
ranks Array of ranks in the PopulationView.
size Size of the PopulationView.
targets List of targets connected to the population.
variables Returns a list of variables of the original population.

Methods

Name Description
coordinates_from_rank Returns the coordinates of a neuron based on its rank.
get Returns current variable/parameter value.
rank_from_coordinates Returns the rank of a neuron based on coordinates.
set Updates the neurons’ variable/parameter values.
sum Returns the array of weighted sums corresponding to the target::

coordinates_from_rank

core.PopulationView.PopulationView.coordinates_from_rank(rank, local=False)

Returns the coordinates of a neuron based on its rank.

When local is False (default), the coordinates are relative to the ORIGINAL population, not the PopulationView.

When local is True, the coordinates are interpreted relative to the geometry of the PopulationView if available. When you add two population views, the geometry is lost and the method will return an error.

The rank is relative to the original population. Iterate over len(pop) otherwise.

Parameters

Name Type Description Default
rank rank of the neuron in the original population required
local whether the coordinates are local to the PopulationView or not (default: False). False

get

core.PopulationView.PopulationView.get(name)

Returns current variable/parameter value.

Parameters

Name Type Description Default
name name of the parameter/variable. required

rank_from_coordinates

core.PopulationView.PopulationView.rank_from_coordinates(coord, local=False)

Returns the rank of a neuron based on coordinates.

When local is False (default), the coordinates are relative to the ORIGINAL population, not the PopulationView.

When local is True, the coordinates are interpreted relative to the geometry of the PopulationView if available. When you add two population views, the geometry is lost and the method will return an error.

The rank is relative to the original population. Iterate over len(pop) otherwise.

Parameters

Name Type Description Default
coord coordinate tuple, can be multidimensional. required
local whther the coordinates are local to the PopulationView or not (default: False). False

set

core.PopulationView.PopulationView.set(value)

Updates the neurons’ variable/parameter values.

Parameters

Name Type Description Default
value dict dictionary of parameters/variables to be updated for the corresponding subset of neurons. It can be a single value or a list/1D array of the same size as the PopulationView. .. code-block:: python >>> subpop = pop[0:5] >>> subpop.set( {‘tau’ : 20, ‘r’= np.random.rand(subpop.size) } ) .. warning:: If you modify the value of a global parameter, this will be the case for ALL neurons of the population, not only the subset. required

sum

core.PopulationView.PopulationView.sum(target)

Returns the array of weighted sums corresponding to the target::

excitatory = pop.sum('exc')

For spiking networks, this is equivalent to accessing the conductances directly::

excitatory = pop.g_exc

If no incoming projection has the given target, the method returns zeros.

Parameters

Name Type Description Default
target the desired projection target. Note: it is not possible to distinguish the original population when the same target is used. required
Monitor
Dendrite
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker