neuro_morpho.reports.stats
Generates plots and reports for model comparison.
Attributes
Functions
|
Extract the branch ids from the skan skeleton data. |
|
Calculate the number of branches in the skeleton data. |
|
Calculate the number of tip points in the skeleton data. |
|
Calculate the total length of the skeleton data. |
|
Calculate the lengths of each branch in the skeleton data. |
|
Generate a summary of the skeleton analysis. |
Module Contents
- neuro_morpho.reports.stats.VALID_DISTANCES
- neuro_morpho.reports.stats.ERR_INVALID_DIST = Multiline-String
Show Value
"""Invalid distance type. Must be one of Set.set(elts=[ <Const.str l.10 at 0x78344d9a2990>, <Const.str l.10 at 0x78344d9a2a10>])"""
- neuro_morpho.reports.stats.SKELETON_STAT_FN
- neuro_morpho.reports.stats.STAT_N_BRANCHES = 'n_branches'
- neuro_morpho.reports.stats.STAT_N_TIP_POINTS = 'n_tip_points'
- neuro_morpho.reports.stats.STAT_TOTAL_LENGTH = 'total_length'
- neuro_morpho.reports.stats.STAT_BRANCH_LENGTHS = 'branch_lengths'
- neuro_morpho.reports.stats.extract_branch_ids(skan_skel_data: pandas.DataFrame) set[int][source]
Extract the branch ids from the skan skeleton data.
- Parameters:
skan_skel_data (pd.DataFrame) – The skan skeleton data.
Returns:
- neuro_morpho.reports.stats.calculate_n_branches(skan_skel_data: pandas.DataFrame, *, include_isolated_branches: bool = False, include_isolated_cycles: bool = False) int[source]
Calculate the number of branches in the skeleton data.
- Parameters:
skan_skel_data (pd.DataFrame) – The skan skeleton data.
- Returns:
The number of branches in the skeleton data.
- neuro_morpho.reports.stats.calculate_n_tip_points(skan_skel_data: pandas.DataFrame, *, include_isolated_branches: bool = False) int[source]
Calculate the number of tip points in the skeleton data.
- Parameters:
skan_skel_data (pd.DataFrame) – The skan skeleton data.
- Returns:
The number of tip points in the skeleton data.
- neuro_morpho.reports.stats.calculate_total_length(skan_skel_data: pandas.DataFrame, dist_type: str = 'euclidean') float[source]
Calculate the total length of the skeleton data.
- Parameters:
skan_skel_data (pd.DataFrame) – The skan skeleton data.
dist_type (str) – The type of distance to use for the length calculation.
- Returns:
The total length of the skeleton data.
- neuro_morpho.reports.stats.calculate_branch_lengths(skan_skel_data: pandas.DataFrame, dist_type: str = 'euclidean') numpy.ndarray[source]
Calculate the lengths of each branch in the skeleton data.
- Parameters:
skan_skel_data (pd.DataFrame) – The skan skeleton data.
dist_type (str) – The type of distance to use for the length calculation.
- Returns:
a numpy array of the branch lengths