neurots.extract_input.from_neurom

Extracts the distributions associated with NeuroM module.

Functions

number_neurites(pop[, neurite_type])

Extract the number of trees for a specific tree type from a given population.

soma_data(pop)

Extract soma size.

transform_distr(opt_distr)

Transform distributions.

trunk_neurite(pop[, neurite_type, bins])

Extract the trunk data for a specific tree type.

neurots.extract_input.from_neurom.number_neurites(pop, neurite_type=NeuriteType.basal_dendrite)

Extract the number of trees for a specific tree type from a given population.

Parameters
Returns

A dictionary with the following structure:

{
    "num_trees": {
        "data": {
            "bins": <bin values>,
            "weights": <weights>
        }
    }
}

Return type

dict

neurots.extract_input.from_neurom.soma_data(pop)

Extract soma size.

Parameters

pop (neurom.core.population.Population) – The given population.

Returns

A dictionary with the following structure:

{
    "size": <the soma size>
}

Return type

dict

neurots.extract_input.from_neurom.transform_distr(opt_distr)

Transform distributions.

Parameters

opt_distr (neurom.stats.FitResults) – The fitted distribution.

Returns

A dictionary whose structure depends on the type of distribution:

  • if type == “norm”:

{
    "norm": {
        "mean": <mean value>,
        "std": <std value>
    }
}
  • if type == “uniform”:

{
    "uniform": {
        "min": <min value>,
        "max": <max value>
    }
}
  • if type == “expon”:

{
    "expon": {
        "loc": <loc value>,
        "lambda": <lambda value>
    }
}

Return type

dict

neurots.extract_input.from_neurom.trunk_neurite(pop, neurite_type=NeuriteType.basal_dendrite, bins=30)

Extract the trunk data for a specific tree type.

Parameters
Returns

A dictionary with the following structure:

{
    "trunk": {
        "orientation_deviation": {
            "data": {
                "bins": <bin values>,
                "weights": <weights>
            }
        },
        "azimuth": {
            "inuform": {
                "min": <min value>,
                "max": <max value>
            }
        },
        "absolute_elevation_deviation": {
            "data": {
                "bins": <bin values>,
                "weights": <weights>
            }
        }
    }
}

Return type

dict