Developing Building BlocksΒΆ
This section explains the generation of new and more complex BuildingBlocks
.
An example of such a BuildingBlock
can be found in the Building Block documentation, as well as in the respective advanced tutorials such as the threeway network
or the OCTA network
.
Every building block inherits from the class BuildingBlocks
which has attributes
such as sub_blocks
, input_groups
, output_groups
and hidden_groups
.
Recommended practices for creating custom BuildingBlocks
are as follow:
Keep the class initialization as concise as possible.
Create a generation function which implements the desired connectivity.
Label correctly
sub_blocks
,input_groups
,output_groups
andhidden_groups
.Remember to
_set_tags
as you expand the network and its functionality; it really helps to keep track of the properties of individual groups.
Important Notes:
When running the network, add the newly generated
BuildingBlock
as well as all thesub_blocks
the network depends on.
There is a fundamental difference between the attributes
groups
and_groups
._groups
is a dictionary containing the objects specific to thatBuildingBlock
.groups
is a property of theBuildingBlock
class which returns all_groups
included in theBuildingBlock
and itssub_blocks
.When overwriting an existing population in one of the
sub_blocks._groups
, remember to re-initialize all theConnections
andmonitors
regarding that population. Which will now be specific to the parent class.
Have fun developing your own BuildingBlocks
and advancing neuroscience! :)