Creating networks#

Default network#

The default configuration contains a skeleton configuration, for an HDF5 storage, without any components in it. The file will be called something like scaffold_network_2022_06_29_10_10_10.hdf5, and will be created once you construct the Scaffold object:

from bsb import Scaffold

network = Scaffold()
network.compile()

Network from config#

You can also first load or create a Configuration object, and create a network from it, by passing it to the Scaffold:

from bsb import Configuration, Scaffold

cfg = Configuration()
# Let's set a file name for the network
cfg.storage.root = "my_network.hdf5"
# And add a cell type
cfg.cell_types.add(
    "hero_cells",
    spatial=dict(
        radius=2,
        density=1e-3,
    ),
)

# After customizing your configuration, create a network from it.
network = Scaffold(cfg)
network.compile()