diameter_synthesis.utils

Utils functions.

Functions

create_morphologies_dict(morph_path[, ...])

Create dict to load the morphologies from a directory, by mtype.

get_all_diameters(neuron)

Get all neuron diameters (morphio only).

redefine_diameter_section(section, diam_ind, ...)

Replace given diameters at indices diam_ind with values diam_new (morphio only).

set_all_diameters(neuron, all_diameters)

Set all neuron diameters (morphio only).

diameter_synthesis.utils.create_morphologies_dict(morph_path, mtypes_file=None)

Create dict to load the morphologies from a directory, by mtype.

Args:

morph_path (str): path to morphologies. mtype_file (str): path to dat file.

Returns:

dictionary of morphologies with single key.

Return type:

dict

diameter_synthesis.utils.get_all_diameters(neuron)

Get all neuron diameters (morphio only).

Parameters:

neuron (morphio.mut.Morphology) – neuron to consider

Returns:

all diameters

Return type:

list

diameter_synthesis.utils.redefine_diameter_section(section, diam_ind, diam_new)

Replace given diameters at indices diam_ind with values diam_new (morphio only).

Parameters:
  • section (neurom.Section) – section to consider.

  • diam_ind (list) – indices of diameters, or points on the section.

  • diam_new (list) – corresponding diameters.

diameter_synthesis.utils.set_all_diameters(neuron, all_diameters)

Set all neuron diameters (morphio only).

Parameters:
  • neuron (morphio.mut.Morophology) – neuron to consider.

  • all_diameters (list) – list of section diameters.