Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: New documentation #858

Merged
merged 76 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1a8b541
Renew placement documentation
filimarc Feb 28, 2024
c95f4b1
Renew Connectivity docs
filimarc Feb 28, 2024
63f1e8c
Renew region and partition doc
filimarc Mar 1, 2024
8c580b6
Merge branch 'main' into New_docs
filimarc Mar 11, 2024
dd172c1
Merge remote-tracking branch 'origin/main' into New_docs
filimarc Apr 11, 2024
8921ac5
Fix deprecated setup-python@v1
filimarc Apr 11, 2024
d70c538
Merge branch 'main' into New_docs
filimarc Jun 26, 2024
4cec130
Remove outdated strategies
filimarc Jul 2, 2024
f7a425c
Merge branch 'main' into New_docs
filimarc Jul 15, 2024
846934e
Merge branch 'main' into New_docs
filimarc Jul 31, 2024
592c20b
docs: Update connectivity documentation
filimarc Aug 6, 2024
adca741
docs: Improve english
filimarc Aug 6, 2024
fc662cf
docs: fix doc refs and initialisms
Aug 9, 2024
95c80ec
docs: update placement documentation
Aug 28, 2024
01136c8
docs: add note for packing error
Aug 30, 2024
f77e952
docs: update cell types documentation
filimarc Sep 6, 2024
5cdc0d4
docs: small updates to partition
filimarc Sep 6, 2024
73896b9
docs: Add getting started for Simulations
filimarc Sep 13, 2024
168d0c5
docs: Update Simulation intro page
Sep 16, 2024
c9a7170
docs: update simulation
Sep 16, 2024
572badb
docs: update nest simulation page
filimarc Sep 17, 2024
174eb58
docs: fix nest simulation docs
filimarc Sep 27, 2024
45d989b
docs: fix configuration usage in gs | remove refs to bsb-plotting
filimarc Oct 9, 2024
fd26887
docs: reshape welcome page and toctrees
filimarc Oct 9, 2024
4363c78
docs: fix refs in regions doc
filimarc Oct 9, 2024
9c98b16
fix: bsb commands related to config creation from template.
drodarie Oct 9, 2024
b4844c0
fix: bsb simulate command output option. Now is used to specify the o…
drodarie Oct 9, 2024
c7c0dca
docs: update analyze page in gs
filimarc Oct 10, 2024
a049938
docs: add json recap for simulation gs
filimarc Oct 10, 2024
8e63d49
docs: update top-level guide
filimarc Oct 11, 2024
0e548fd
chore: merge branch main on branch New_docs
drodarie Oct 14, 2024
7fbe8f4
docs: improve wording in installation and top level guide.
drodarie Oct 14, 2024
9b89272
docs: improve getting-started_reconstruction.rst.
drodarie Oct 15, 2024
c783f88
docs: Refactor documentations
drodarie Oct 17, 2024
28d0c8b
docs: update README
filimarc Oct 18, 2024
a2f1a97
docs: update GS config templates and line refs
filimarc Oct 18, 2024
63d91c5
docs: Fix installations tabs.
drodarie Oct 18, 2024
7f3b201
docs: add targetting doc in simulation page
filimarc Oct 21, 2024
5b6a88f
docs: fix targetting section
filimarc Oct 21, 2024
734c1b2
docs: remove neuromorfo uri scheme ref in gs
filimarc Oct 22, 2024
2ccfb95
chore: Merge branch 'New_docs' of github.com:dbbs-lab/bsb-core into N…
filimarc Oct 22, 2024
f9c6bc4
docs: Rewrite simulation. Update workflow figure.
drodarie Oct 28, 2024
4c36d3f
docs: Update simulation tutorial.
drodarie Oct 29, 2024
0b62f84
docs: update placement set
filimarc Oct 30, 2024
25f5c8d
docs: add connectivity-set page
filimarc Oct 30, 2024
b81f3a2
docs: Merge examples for accessing storage data.
drodarie Oct 30, 2024
6e5e02c
docs: Rewrite analyse_spike_results, reorganize configuration section.
drodarie Oct 31, 2024
0eabf30
docs: Add example to display morphologies, rewrite project tutorial
drodarie Oct 31, 2024
7c58b33
docs: update tutorials
filimarc Nov 1, 2024
19ff167
docs: Minor fixes to tutorial on python projects section
drodarie Nov 5, 2024
b871a37
docs: Add documentation to ConnectionStrategy
drodarie Nov 5, 2024
b2a7f60
docs: Add tutorial on writing components separated from components.rst
drodarie Nov 5, 2024
ada450a
docs: First draft of the tutorial for writing placement strategy
drodarie Nov 6, 2024
7292807
docs: Fix tutorial placement strategy
drodarie Nov 6, 2024
047f1f5
docs: Fix some typos and config for nest simulation tutorial.
drodarie Nov 7, 2024
3044916
docs: separate neuron and nest tutorials.
drodarie Nov 7, 2024
2438b79
docs: simplify the placement class for the tutorial
drodarie Nov 7, 2024
1920d9c
docs: add missing nest config
drodarie Nov 7, 2024
157401e
docs: add tutorial-template files for NEURON sim | update gs
filimarc Nov 8, 2024
f54ffa3
docs: Update neuron simulation guide
filimarc Nov 11, 2024
3b547b2
docs: Add section for analyze neuron results | update neuron parts of gs
filimarc Nov 14, 2024
4986e73
docs: WIP on guide for neuron simulation
drodarie Nov 19, 2024
0919db7
docs: fix naming in neuron gs
filimarc Nov 22, 2024
b42a978
docs: fix ref number in neuron gs
filimarc Nov 22, 2024
edc7a43
docs: add section for simulation results
filimarc Nov 22, 2024
45752c6
docs: fix guide neurons json indent and lines
drodarie Nov 22, 2024
78be5e7
docs: Add explanation on distribution placement.
drodarie Nov 22, 2024
11da986
docs: Rework guides for simulations
drodarie Nov 24, 2024
8e4001d
docs: simplify writing components tutorial by splitting connection an…
drodarie Nov 26, 2024
1961dc4
docs: Add FAQ for BSB-MUSIC related issue
drodarie Nov 26, 2024
5d8ec80
docs: fix strategy in yaml gs
filimarc Dec 6, 2024
90fbd3f
docs: Add figures and rewrite scaffold page.
drodarie Dec 8, 2024
43991f2
docs: Improve documentation on parallelization + minor fixes
drodarie Dec 8, 2024
17e27eb
test: add tests for bsb new
drodarie Dec 28, 2024
d51b0ac
fix: add bsb-json dependencies for bsb project tests
drodarie Dec 28, 2024
07e30cc
Merge branch 'main' into New_docs
drodarie Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/connectivity/defining.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
====================
Helveg marked this conversation as resolved.
Show resolved Hide resolved
Defining connections
Connectivity
====================

The connection between cells is managed with ``ConnectivityStrategy`` objects. A strategy
present all the rules to apply for the definition of connection among cells. In BSB is implemented
a set of strategies ready to use (here is a :doc:`list </connectivity/connection-strategies>`), but it also possible to build a customised strategy.
Once created the connectivity are stored in :class:`ConnectivitySets <.storage.interfaces.ConnectivitySet>`.

Adding a connection type
========================

Expand Down
17 changes: 7 additions & 10 deletions docs/getting-started/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dimensions. See :doc:`/topology/intro` for more explanation on topology componen
Cell types
----------

The :class:`~.cell_types.CellType` is a definition of a cell population. During
The :doc:`Cell Type </cells/intro>` is a definition of a cell population. During
placement 3D positions, optionally rotations and morphologies or other properties will be
created for them. In the simplest case you define a soma :guilabel:`radius` and
:guilabel:`density` or fixed :guilabel:`count`:
Expand Down Expand Up @@ -119,12 +119,10 @@ Placement
:lines: 19-24


The ``placement`` blocks use the cell type indications to place cell types into
partitions. You can use other :class:`PlacementStrategies
<.placement.strategy.PlacementStrategy>` by setting the :guilabel:`strategy` attribute.
The BSB offers some strategies out of the box, or you can implement your own. The
:class:`~bsb.placement.random.RandomPlacement` places cells randomly in the assigned
volume.
The :doc:`placement </placement/intro>` blocks is charge to place cells in the partitions using the cell type indications.
filimarc marked this conversation as resolved.
Show resolved Hide resolved
You can specify the strategy to use by setting the :guilabel:`strategy` attribute.
Here we use the strategy :guilabel:`ParticlePlacement` that considers the cells as spheres and
bumps them around as repelling particles until there is no overlap between them.

Take another look at your network:

Expand Down Expand Up @@ -157,9 +155,8 @@ Connectivity
:lines: 25-30


The ``connectivity`` blocks specify connections between systems of cell types. They can
create connections between single or multiple pre and postsynaptic cell types, and can
produce one or many :class:`ConnectivitySets <.storage.interfaces.ConnectivitySet>`.
The :doc:`connectivity </connectivity/defining>` blocks specify connections between systems of cell types. They can
create connections between single or multiple cell types for both pre and post synaptic groups.

Regenerate the network once more, now it will also contain your connections! With your
cells and connections in place, you're ready to move to the :ref:`simulations` stage.
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/include_morphos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ change the name we can use a node with a :guilabel:`name` and :guilabel:`file`:
:emphasize-lines: 3

It is also possible to add a pipeline to perform transformations on the loaded
morphology. Pipelines can be added by adding a :guilabel`pipeline` list to the morphology node.
morphology. Pipelines can be added by adding a :guilabel:`pipeline` list to the morphology node.
Each item in the list may either be a string reference to an importable function or a method of
the :class:`~bsb.morphologies.Morphology` class. To pass parameters, use a node with the
function reference placed in the guilabel:`func` attribute, and a :guilabel:`parameters` list.
function reference placed in the :guilabel:`func` attribute, and a :guilabel:`parameters` list.
Here is an example what that would look like:

.. tab-set-code::
Expand Down Expand Up @@ -157,7 +157,7 @@ Morphology intersection
-----------------------

Now that we have assigned morphologies to our cell types, we can use morphology-based
connection strategies such as :class:`~.connectivity.detailed.voxel_intersection.VoxelIntersection`:
connection strategies such as :doc:`VoxelIntersection </connectivity/connection-strategies>`:

.. tab-set-code::

Expand All @@ -176,7 +176,7 @@ connection strategies such as :class:`~.connectivity.detailed.voxel_intersection
.. note::

If there's multiple morphologies per cell type, they'll be assigned randomly, unless you
specify a :class:`~.placement.distributor.MorphologyDistributor`.
specify a :ref:`MorphologyDistributor <MorphologiesDistributors>`.
filimarc marked this conversation as resolved.
Show resolved Hide resolved


Recap
Expand Down
1 change: 1 addition & 0 deletions docs/morphologies/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ Currently unspecified, up to the Storage and MorphologyRepository support to ret
dictionary of available metadata from
:meth:`~.storage.interfaces.MorphologyRepository.get_meta`.

.. _MorphologiesDistributors:
filimarc marked this conversation as resolved.
Show resolved Hide resolved

Morphology distributors
-----------------------
Expand Down
9 changes: 9 additions & 0 deletions docs/placement/intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
==========
Placement
==========
This is the block that fills cells into partitions.
The main object is the PlacementStrategy, a set of instructions for the definition of the positions of each cells in the partition volume.

The BSB offers some strategies out of the box (here is a :doc:`list </placement/placement-strategies>`), or you can implement your own.

The data is stored in :doc:`PlacementSets </placement/placement-set>` per cell type.
filimarc marked this conversation as resolved.
Show resolved Hide resolved
35 changes: 35 additions & 0 deletions docs/placement/placement-strategies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,46 @@ RandomPlacement

*Class*: :class:`bsb.placement.RandomPlacement <.placement.random.RandomPlacement>`

This class place cells in random postition without caring about overlaps. Here is an example with 10 cells.
filimarc marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: json

{
"cell_types": {
"golgi_cell": {
"placement": {
"class": "bsb.placement.particle.RandomPlacement",
"layer": "granular_layer",
"count": 10
}
},
}

ParallelArrayPlacement
**********************

*Class*: :class:`bsb.placement.ParallelArrayPlacement
<.placement.arrays.ParallelArrayPlacement>`

This class place cells in an aligned array, it create a lattice with fixed spacing and with the desired angle.
It is necessary to specify ``spacing_x`` and ``angle`` attributes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT


.. code-block:: json

{
"cell_types": {
"golgi_cell": {
"placement": {
"class": "bsb.placement.arrays.ParallelArrayPlacement",
"layer": "granular_layer",
"count": 100,
"spacing_x": 10,
"angle": 0
}
},
}
}

FixedPositions
**************

Expand All @@ -37,3 +70,5 @@ This class places the cells in fixed positions specified in the attribute ``posi
},
}
}


1 change: 1 addition & 0 deletions docs/placement/placement-toc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
:maxdepth: 2
:caption: Placement

intro
placement-strategies
placement-set
12 changes: 6 additions & 6 deletions docs/topology/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Layouts
=======

The topology module allows you to make abstract descriptions of the spatial layout of
pieces of the region you are modelling. :class:`Partitions
<.topology.partition.Partition>` define shapes such as layers, cubes, spheres, and meshes.
:class:`Regions <.topology.region.Region>` put partitions together by arranging them
pieces of the region you are modelling. :doc:`Partitions
</topology/partitions>` define shapes such as layers, cubes, spheres, and meshes.
:doc:`Regions </topology/regions>` put partitions together by arranging them
hierarchically. The topology is formed as a tree of regions, that end downstream in a
terminal set of partitions.

Expand All @@ -31,11 +31,11 @@ Example
:figclass: only-dark
:align: center

The root :class:`Group <.topology.region.RegionGroup>` receives the network X, Y, and Z. A
The root ``Group`` receives the network X, Y, and Z. A
``Group`` is an inert region and simply passes the network boundaries on to its children.
The :class:`~.topology.partition.Voxels` loads its voxels, and positions them absolutely,
The :ref:`Voxels <voxel-partition>` loads its voxels, and positions them absolutely,
ignoring the network boundaries. The :class:`~.topology.region.Stack` passes the volume on
to the :class:`Layers <.topology.partition.Layer>` who fill up the space and occupy their
to the :ref:`Layers <layer-partition>` who fill up the space and occupy their
thickness. They return their layout up to the parent ``Stack``, who in turn proposes
translations to the layers in order to stack them on top of the other. The end result is
stack beginning from the network starting corner, with 2 layers as large as the network,
Expand Down
77 changes: 77 additions & 0 deletions docs/topology/partitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,83 @@
Partitions
##########

Partitions contain shape descriptions used for the spatial layout of the network.
These descriptions can be represented as layers, meshes and voxelsets.
In BSB are implemented two different kind of partitions: :ref:`layer <layer-partition>` and :ref:`voxel based <voxel-partition>`.
filimarc marked this conversation as resolved.
Show resolved Hide resolved

.. _layer-partition:

======
Layers
======

:class:`Layer partition <.topology.partition.Layer>` is a parallelepiped shaped volume.
The size of a layer is defined by the network except for the height, therefore it is needed to
specify the thickness of the layer with the ``thickness`` attribute.
filimarc marked this conversation as resolved.
Show resolved Hide resolved

.. tab-set-code::

.. code-block:: json

{
"partitions": {
"my_layer_partition": {
"type": "layer",
"thickness": 25
}
}
}

Cortical Model Use Case
-----------------------


Layers can be organized in a pile in order to separate the structure of your network according to the depth.
:ref:`Stack <stack-region>` region is used to pile up your layers, for a three layer system it will be:
filimarc marked this conversation as resolved.
Show resolved Hide resolved

.. tab-set-code::

.. code-block:: json

{
"name": "Starting example",
"storage": {
"engine": "hdf5",
"root": "network.hdf5"
},
"network": {
"x": 400.0,
"y": 600.0,
"z": 300.0
},
"regions": {
"brain_region": {
"type": "stack",
"children": ["base_layer","middle_layer","top_layer"]
}
},
"partitions": {
"base_layer": {
"type": "layer",
"thickness": 100,
"stack_index": 0
},
"middle_layer": {
"type": "layer",
"thickness": 100,
"stack_index": 1
},
"top_layer": {
"type": "layer",
"thickness": 100,
"stack_index": 2
}
}
}




.. _voxel-partition:

======
Expand Down
8 changes: 8 additions & 0 deletions docs/topology/regions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Regions
#######

In BSB a regions is a hierarchical container of :doc:`partitions <topology/partitions>`
used to manage different areas of the network.
filimarc marked this conversation as resolved.
Show resolved Hide resolved

.. _stack-region:

=======================
List of builtin regions
=======================

BSB provide an implemented :class:`stack <.topology.regions.Stack>` type region that
allow to create a pile of partitions.
filimarc marked this conversation as resolved.
Show resolved Hide resolved
Loading