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.

trunk_neurite_3d_angles(pop, neurite_type, bins)

Extract 3d trunk angle data.

trunk_neurite_simple(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, min_n_basals=1)

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.

See docstring of trunk_neurite_simple() and trunk_neurite_3d_angles() for more details on the extracted angles.

Parameters:
Returns:

A dictionary with the trunk data.

Return type:

dict

neurots.extract_input.from_neurom.trunk_neurite_3d_angles(pop, neurite_type, bins)

Extract 3d trunk angle data.

We extract non-projected, or 3d angles between the pia/apical and any neurite trunk.

If no apical dendrite is present, the entry apical_3d_angles will be absent.

Parameters:
Returns:

A dictionary with the following structure:

{
    "trunk": {
        "pia_3d_angles": {
            "data": {
                "bins": <bin values>,
                "weights": <weights>
            }
        },
        "apical_3d_angles": {
            "data": {
                "bins": <bin values>,
                "weights": <weights>
            }
        }
    }
}

Return type:

dict

neurots.extract_input.from_neurom.trunk_neurite_simple(pop, neurite_type, bins)

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": {
            "uniform": {
                "min": <min value>,
                "max": <max value>
            }
        },
        "absolute_elevation_deviation": {
            "data": {
                "bins": <bin values>,
                "weights": <weights>
            }
        }
    }
}

Return type:

dict