bsb_arbor package¶
Subpackages¶
Submodules¶
bsb_arbor.adapter module¶
- class bsb_arbor.adapter.ArborAdapter(comm=None)¶
Bases:
SimulatorAdapter- Parameters:
comm – The mpi4py MPI communicator to use. Only nodes in the communicator will participate in the simulation. The first node will idle as the main node.
- get_gid_manager(simulation, simdata)¶
- get_recipe(simulation, simdata=None)¶
- prepare(simulation: ArborSimulation) ArborSimulationData¶
Prepares the arbor simulation engine with the given simulation.
- Parameters:
simulation (ArborSimulation)
- Return type:
- run(*simulations)¶
Fire up the prepared adapter.
- Parameters:
simulations (Simulation) – One or a list of simulation configurations to simulate.
- Returns:
List of simulation results.
- Return type:
- class bsb_arbor.adapter.ArborRecipe(*args: Any, **kwargs: Any)¶
Bases:
recipe- cell_description(gid)¶
- cell_kind(gid)¶
- connections_on(gid)¶
- event_generators(gid)¶
- gap_junctions_on(gid)¶
- global_properties(kind)¶
- num_cells()¶
- probes(gid)¶
- class bsb_arbor.adapter.ArborSimulationData(simulation)¶
Bases:
SimulationDataContainer class for simulation data.
Container class for simulation data.
- class bsb_arbor.adapter.GIDManager(simulation, simdata)¶
Bases:
object- all()¶
- get_populations()¶
- lookup_kind(gid)¶
- lookup_model(gid)¶
- lookup_offset(gid)¶
- sort_models(models)¶
- class bsb_arbor.adapter.Population(simdata, cell_model, offset)¶
Bases:
objectRepresents a population of cells for the Arbor simulator.
This class manages a collection of cells from a specific cell model, handling their GID ranges and providing methods to access and manipulate subsets of the population.
Initialize a population of cells.
- Parameters:
simdata – The simulation data container
cell_model – The cell model for this population
offset – The GID offset for this population
- copy()¶
Create a copy of this population.
- Returns:
A new Population instance with the same properties
- property model¶
Get the cell model associated with this population.
- Returns:
The cell model object
- property offset¶
Get the GID offset for this population.
- Returns:
The GID offset value
bsb_arbor.cell module¶
- class bsb_arbor.cell.ArborCell(*args, _parent=None, _key=None, **kwargs)¶
Bases:
CellModel- abstractmethod cache_population_data(simdata, ps: PlacementSet)¶
- Parameters:
ps (PlacementSet)
- abstractmethod discard_population_data()¶
- gap¶
Is this synapse a gap junction?
- abstractmethod get_cell_kind(gid)¶
- get_description(gid)¶
- get_node_name()¶
- abstractmethod get_prefixed_catalogue()¶
- abstractmethod make_receiver_collection()¶
- model¶
Importable reference to the arborize model describing the cell type.
- model_strategy: ConfigurationAttribute¶
Optional importable reference to a different modelling strategy than the default Arborize strategy.
- class bsb_arbor.cell.LIFCell(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ArborCell- cache_population_data(simdata, ps: PlacementSet)¶
- Parameters:
ps (PlacementSet)
- constants¶
Dictionary linking the parameters’ name to its value.
- discard_population_data()¶
- get_cell_kind(gid)¶
- get_description(gid)¶
- get_node_name()¶
- get_prefixed_catalogue()¶
- make_receiver_collection()¶
bsb_arbor.connection module¶
- class bsb_arbor.connection.ArborConnection(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ConnectionModel- create_connections_from(conns_from_gid, conns, pop_pre, pop_post)¶
- create_connections_on(conns_on_gid, conns, pop_pre, pop_post)¶
- create_gap_junctions_on(gj_on_gid, conns)¶
- delay¶
Delay of the transmission between the presynaptic and the postsynaptic cells.
- gap¶
Is this synapce a gap junction?
- gap_junction(conn)¶
- get_node_name()¶
- weight¶
Weight of the connection between the presynaptic and the postsynaptic cells.
bsb_arbor.device module¶
- class bsb_arbor.device.ArborDevice(*args, _parent=None, _key=None, **kwargs)¶
Bases:
DeviceModel- device: ConfigurationAttribute¶
Optional importable reference to the device strategy.
- get_meta()¶
- get_node_name()¶
- get_samples(sim)¶
- implement(adapter, simulation, simdata)¶
Method called when simulation is being set up. Can be used for components to set themselves up and store the context they need to operate.
- abstractmethod implement_generators(simdata, target)¶
- abstractmethod implement_probes(simdata, target)¶
- register_probe_id(gid, tag)¶
- resolution¶
Time resolution of the device.
- sample(sim, probe_id)¶
- sampling_policy¶
Policy used to sample simulation data from the device.
- targetting¶
Targets of the device, which should be either a population or a nest rule.
bsb_arbor.simulation module¶
- class bsb_arbor.simulation.ArborSimulation(*args, _parent=None, _key=None, **kwargs)¶
Bases:
SimulationInterface between the scaffold model and the Arbor simulator.
- connection_models: cfgdict[ArborConnection]¶
Dictionary of connection models in the simulation.
- devices: cfgdict[ArborDevice]¶
Dictionary of devices in the simulation.
- get_node_name()¶
- profiling¶
Flag to perform profiling during the simulation.
- resolution¶
Simulation time step size in milliseconds.
- threads¶
Module contents¶
Arbor simulation adapter for the BSB framework.
- class bsb_arbor.ArborAdapter(comm=None)¶
Bases:
SimulatorAdapter- Parameters:
comm – The mpi4py MPI communicator to use. Only nodes in the communicator will participate in the simulation. The first node will idle as the main node.
- get_gid_manager(simulation, simdata)¶
- get_recipe(simulation, simdata=None)¶
- prepare(simulation: ArborSimulation) ArborSimulationData¶
Prepares the arbor simulation engine with the given simulation.
- Parameters:
simulation (ArborSimulation)
- Return type:
- run(*simulations)¶
Fire up the prepared adapter.
- Parameters:
simulations (Simulation) – One or a list of simulation configurations to simulate.
- Returns:
List of simulation results.
- Return type:
- class bsb_arbor.PoissonGenerator(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ArborDevice- delay¶
Delay of the transmission between the device and its target.
- get_node_name()¶
- implement_generators(simdata, gid)¶
- implement_probes(simdata, gid)¶
- rate¶
Frequency of the poisson generator.
- record¶
Flag to save the spikes generated to file.
- weight¶
Weight of the connection between the device and its target.
- class bsb_arbor.Probe(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ArborDevice- get_probe_name()¶
- implement(adapter, simulation, simdata)¶
Method called when simulation is being set up. Can be used for components to set themselves up and store the context they need to operate.
- required = ['targetting', 'probe_type']¶
- validate_specifics()¶
- class bsb_arbor.SpikeRecorder(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ArborDevice- boot()¶
- get_node_name()¶
- implement(adapter, simulation, simdata)¶
Method called when simulation is being set up. Can be used for components to set themselves up and store the context they need to operate.
- implement_generators(simdata, gid)¶
- implement_probes(simdata, gid)¶