Output module¶
- class bsb.output.HDF5Formatter[source]¶
Stores the output of the scaffold as a single HDF5 file. Is also a MorphologyRepository and an HDF5TreeHandler.
- get_connectivity_set(tag)[source]¶
Return a connectivity set.
- Parameters
tag (string) – Key of the connectivity set in the connections group.
- Returns
The connectivity set.
- Return type
ConnectivitySet
- Raises
DatasetNotFoundError
- get_connectivity_set_connection_types(tag)[source]¶
Return all the ConnectionStrategies that contributed to the creation of this connectivity set.
- get_simulator_output_path(simulator_name)[source]¶
Return the path where a simulator can dump preliminary output.
- class bsb.output.MorphologyCache(morphology_repository)[source]¶
Loads and caches
morphologies
so that each morphology is loaded only once and its instance is shared among all cells with that Morphology. Saves a lot on memory, but the Morphology should be treated as read only.- rotate_all_morphologies(phi_step, theta_step=None)[source]¶
Extracts all unrotated morphologies from a morphology_repository and creates rotated versions, at sampled orientations in the 3D space
- Parameters
phi_step (int, optional) – Resolution of azimuth angle sampling, in degrees
theta_step – Resolution of elevation angle sampling, in degrees
- class bsb.output.MorphologyRepository(file=None)[source]¶
- get_handle(mode='r')[source]¶
Open the HDF5 storage resource and initialise the MorphologyRepository structure.
- import_arbz(name, cls, overwrite=False)[source]¶
Import an Arborize model as a morphology.
Arborize models make some assumptions about morphologies, inherited from how NEURON deals with it: There is only 1 root, and the soma is at the beginning of this root. This is not necesarily so for morphologies in general in the BSB that can have as many roots as they want.
- import_swc(file, name, tags=[], overwrite=False)[source]¶
Import and store .swc file contents as a morphology in the repository.
- list_morphologies(include_rotations=False, only_rotations=False, cell_type=None)[source]¶
Return a list of morphologies in a morphology repository, filtered by rotation and/or cell type.
- Parameters
include_rotations (bool) – Include each cached rotation of each morphology.
only_rotations (bool) – Get only the rotated caches of the morphologies.
cell_type – Specify the cell type for which you want to extract the morphologies.
cell_type – CellType
- Returns
List of morphology names
- Return type
list
- class bsb.output.OutputFormatter[source]¶
-
- abstract get_connectivity_set(tag)[source]¶
Return a connectivity set.
- Parameters
tag (string) – Key of the connectivity set in the connections group.
- Returns
The connectivity set.
- Return type
ConnectivitySet
- Raises
DatasetNotFoundError
- abstract get_connectivity_set_connection_types(tag)[source]¶
Return the connection types that contributed to this connectivity set.
- abstract get_connectivity_set_meta(tag)[source]¶
Return the meta dictionary of this connectivity set.
- abstract get_connectivity_sets()[source]¶
Return all connectivity sets.
- Returns
List of connectivity sets.
- Return type
ConnectivitySet
- abstract get_simulator_output_path(simulator_name)[source]¶
Return the path where a simulator can dump preliminary output.