nngt.geometry.
Shape
(unit='um', parent=None)[source]¶Class containing the shape of the area where neurons will be distributed to form a network.
area
¶double – Area of the shape in mm^2.
centroid
¶tuple of doubles – Position of the center of mass of the current shape.
add_subshape
(subshape, position, unit='um')[source]¶Add a Shape
to the current one.
Parameters: |
|
---|
area
¶Area of the shape.
centroid
¶Centroid of the shape.
coords
¶disk
(radius, centroid=(0.0, 0.0), unit='um', parent=None)[source]¶Generate a disk of given radius and center (centroid).
Parameters: |
|
---|---|
Returns: | shape ( |
geom_type
¶parent
¶Return the parent of the Shape
.
rectangle
(height, width, centroid=(0.0, 0.0), unit='um', parent=None)[source]¶Generate a rectangle of given height, width and center of mass.
Parameters: |
|
---|---|
Returns: | shape ( |
seed_neurons
(nodes=None)[source]¶Return the positions of the neurons inside the
Shape
.
Parameters: |
|
---|---|
Returns: | positions (array of double with shape (N, 2)) |
unit
¶Return the unit for the Shape
coordinates.
nngt.
NeuralPop
(size, parent=None, with_models=True, **kwargs)[source]The basic class that contains groups of neurons and their properties.
Variables: | has_models – bool ,
True if every group has a model attribute. |
---|
Initialize NeuralPop instance
Parameters: | |
---|---|
Returns: | pop ( |
add_to_group
(group_name, id_list)[source]copy
(pop)[source]Copy an existing NeuralPop
create_group
(name, neurons, ntype=1, neuron_model=None, neuron_param=None, syn_model='static_synapse', syn_param=None)[source]Create a new groupe from given properties.
Parameters: |
|
---|
exc_and_inhib
(size, iratio=0.2, parent=None, en_model='aeif_cond_alpha', en_param={}, es_model='static_synapse', es_param={}, in_model='aeif_cond_alpha', in_param={}, is_model='static_synapse', is_param={})[source]Make a NeuralPop with a given ratio of inhibitory and excitatory neurons.
from_groups
(groups, names=None, parent=None, with_models=True)[source]Make a NeuralPop object from a (list of) NeuralGroup
object(s).
from_network
(graph, *args)[source]Make a NeuralPop object from a network. The groups of neurons are
determined using instructions from an arbitrary number of
GroupProperties
.
get_group
(neurons, numbers=False)[source]Return the group of the neurons.
Parameters: |
|
---|
get_param
(groups=None, neurons=None, element='neuron')[source]Return the element (neuron or synapse) parameters for neurons or groups of neurons in the population.
Parameters: |
|
---|---|
Returns: | param ( |
has_models
is_valid
set_model
(model, group=None)[source]Set the groups’ models.
Parameters: |
|
---|
Note
By default, synapses are registered as “static_synapse”s in NEST;
because of this, only the neuron_model
attribute is checked by
the has_models
function: it will answer True
if all groups
have a ‘non-None’ neuron_model
attribute.
Warning
No check is performed on the validity of the models, which means that errors will only be detected when building the graph in NEST.
set_param
(param, group=None)[source]Set the groups’ parameters.
Parameters: |
|
---|
size
uniform
(size, parent=None, neuron_model='aeif_cond_alpha', neuron_param=None, syn_model='static_synapse', syn_param=None)[source]Make a NeuralPop of identical neurons