nngt.
GroupProperty
(size, constraints={}, neuron_model=None, neuron_param={}, syn_model=None, syn_param={})[source]¶Class defining the properties needed to create groups of neurons from an
existing GraphClass
or one of its subclasses.
Variables: |
|
---|
Create a new instance of GroupProperties.
Notes
int
) to constrain the
total degree of the nodesdouble
) to constrain the betweenness
centralitynngt.geometry.Shape
) to chose neurons inside
a given spatial regionExamples
>>> di_constrain = { "avg_deg": 10, "min_betw": 0.001 }
>>> group_prop = GroupProperties(200, constraints=di_constrain)
nngt.
NeuralGroup
(nodes=None, ntype=1, model=None, neuron_param=None, syn_model=None, syn_param=None)[source]¶Class defining groups of neurons.
Variables: |
|
---|
Note
By default, synapses are registered as "static_synapse"
in NEST;
because of this, only the neuron_model
attribute is checked by the
has_model
function.
Warning
Equality between NeuralGroup`s only compares
the neuronal and synaptic ``model`
and param
attributes, i.e.
groups differing only by their ids
will register as equal.
Create a group of neurons (empty group is default, but it is not a valid object for most use cases).
Parameters: |
|
---|---|
Returns: | A new |
has_model
¶ids
¶nest_gids
¶neuron_model
¶properties
¶size
¶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 ( |
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, en_model='aeif_cond_alpha', en_param=None, es_model='static_synapse', es_param=None, in_model='aeif_cond_alpha', in_param=None, is_model='static_synapse', is_param=None, parent=None)[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).
Parameters: |
|
---|
Note
If the population is not generated from an existing
Graph
and the groups do not contain explicit ids, then
the ids will be generated upon population creation: the first group, of
size N0, will be associated the indices 0 to N0 - 1, the second group
(size N1), will get N0 to N0 + N1 - 1, etc.
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
¶