snnib.io.brian22snnib¶
- snnib.io.brian22snnib(net: Network, t_sim: Quantity, dt: Quantity, save: str = False, seed: int = None)[source]¶
saves net to snnib compatible json file
- function to convert brian2 network to a file that can be imported using SNNIB
uses net to obtain network elements (synapses, neurons, spiketrains)
generates random 3d coordinates $
- ec x in [-1,1]$ for each neuron
removes units (stores them separately)
extracts some simulation metadata
- Parameters
- net
brian2.Network
the network object to convert to SNNIB format
- t_sim
brian2.Quantity
simulation time of the brian2 simulation
- dt
brian2.Quantity
time-step of the brian2 simulation
- save
str, optional
file to save the result to
- the default is False
result not saved
Raises
- Returns
- snnib_obj
dict
json
generated object that is compatible with SNNIB
- Dependencies
brian2
json
logging