snudda.init.init¶
- class snudda.init.init.SnuddaInit(network_path=None, struct_def=None, snudda_data=None, neurons_dir=None, config_file=None, random_seed=None, connection_override_file=None)[source]¶
Creates network-config.json in network_path.
Constructor
Args: network_path (str): location of network files struct_def (dict, optional): definition of struct to create snudda_data (str, optional): Path to SNUDDA_DATA neurons_dir (str, optional): path to neurons, default is $SNUDDA_DATA/neurons (DEPRECATED) config_file (str, optional): name of network config file, default network-config.json random_seed (int, optional): random seed
- define_structure(struct_name, struct_mesh, d_min=None, struct_centre=None, side_len=None, slice_depth=None, mesh_bin_width=None)[source]¶
Sets up definition for a brain structure (e.g. Cortex, Striatum, …).
- Parameters
struct_name (str) – Name of brain structure
struct_mesh (str) – Path to wavefront obj file with 3D mesh of structure or ‘cube’ or ‘slice’
d_min (float) – Minimum distance between somas (puts upper limit on neuron density)
struct_centre ((float, float, float)) – Location of brain structure (centre)
side_len (float, optional) – side of cube, or slice
slice_depth (float, optional) – depth of slice
mesh_bin_width (float) – discretisation of 3D mesh during cell placement
- get_morphologies(neuron_dir)[source]¶
Returns SWC morphology(s) path or file, depending on ‘morphology’ if specified in parameters.json or not.
If ‘morphology’ in parameters.json exists then the path where these morphologies are stored is returned. If it does not exist it is assumed that there is exactly one SWC file present in the neuron_dir, and that is then returned.
- Parameters
neuron_dir (str) – Path to neuron directory, may contain $SNUDDA_DATA, shorthand for SNUDDA_DATA directory