diameter_synthesis.main
Main functions to learn and generate diameters.
Functions
diametrize_single_neuron (neuron[, config, ...])
|
Diametrize single neuron by learning diameter model from it. |
plot_models (morphologies, config, ...[, ext])
|
Plot the models. |
run_diameters (config_file, models_params_file)
|
Build new diameters from config file and diameter model. |
run_models (config_file, plot[, ext])
|
Run the model extraction from config file. |
Classes
DiameterWorker (model, models_params, config)
|
Worker for building diameters. |
NumpyEncoder (*[, skipkeys, ensure_ascii, ...])
|
Class to encode numpy arrays. |
-
class diameter_synthesis.main.DiameterWorker(model, models_params, config)
Bases: object
Worker for building diameters.
- Parameters
model (str) – The model to use.
models_params (dict) – The parameters of the models containing the model name as key.
config (dict) – The configuration to use.
-
class diameter_synthesis.main.NumpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
Bases: json.encoder.JSONEncoder
Class to encode numpy arrays.
-
default(o)
Numpy encoder.
-
diameter_synthesis.main.diametrize_single_neuron(neuron, config=None, apical_point_sec_ids=None)
Diametrize single neuron by learning diameter model from it.
- Parameters
neuron (mophio.mut.Morphology) – neuron to consider.
config (dict) – dict with entry ‘model’ and ‘diameters’ with corresponding dicts, if None,
default dict will be used.
apical_point_sec_ids (list) – list of apical points if any.
-
diameter_synthesis.main.plot_models(morphologies, config, models_params, models_data, ext='.png')
Plot the models.
- Parameters
morphologies (dict) – a dict with mtype->[morphologies].
config (dict) – the config to use.
models_params (dict) – the models parameters.
models_data (dict) – the models data.
ext (str) – the file extension used to export the figures.
-
diameter_synthesis.main.run_diameters(config_file, models_params_file)
Build new diameters from config file and diameter model.
- Parameters
-
-
diameter_synthesis.main.run_models(config_file, plot, ext='.png')
Run the model extraction from config file.
- Parameters
config_file (str) – the path to the configuration file.
plot (bool) – plot the models once they are built.
ext (str) – the file extension used to export the plots.