blue_cwl.statistics

Composition summary statistics.

Functions

atlas_densities_composition_summary(...[, ...])

Calculate the composition summary statistics of a density distribution.

density_summary_stats_region(...)

Serialize df_region_mtype_etype to required summary statistics format.

get_statistics_from_nrrd_volume(region_map, ...)

Get statistics about an nrrd volume.

mtype_etype_url_mapping(density_distribution)

Get mtype and etype labels mapped to their uris.

mtype_etype_url_mapping_from_nexus([base, token])

Get mtype and etype labels mapped to their uris, from nexus.

node_population_composition_summary(...)

Calculate the composition summary statistics of a node population.

blue_cwl.statistics.atlas_densities_composition_summary(density_distribution: ~pandas.core.frame.DataFrame, region_map: ~voxcell.region_map.RegionMap, brain_regions: ~voxcell.voxel_data.VoxelData, map_function=<class 'map'>) dict

Calculate the composition summary statistics of a density distribution.

blue_cwl.statistics.density_summary_stats_region(df_region_mtype_etype: DataFrame) dict

Serialize df_region_mtype_etype to required summary statistics format.

Parameters:
  • region_map – voxcell.region map to use

  • df_region_mtype_etype (DataFrame) – specifying the region/mtype/etype of

  • statistics (the)

  • mtype_urls (dict) – mapping for mtype labels to mtype urls

  • etype_urls (dict) – mapping for etype labels to etype urls

blue_cwl.statistics.get_statistics_from_nrrd_volume(region_map: VoxelData, brain_regions: VoxelData, mtype: str, etype: str, nrrd_path: str | PathLike[str]) list[dict]

Get statistics about an nrrd volume.

Parameters:
  • region_map – voxcell.region map to use

  • brain_regions – annotation atlas

  • mtype (str) – label to apply to values

  • etype (str) – label to apply to values

  • nrrd_path – path to nrrd file

blue_cwl.statistics.mtype_etype_url_mapping(density_distribution: DataFrame) tuple[dict, dict]

Get mtype and etype labels mapped to their uris.

blue_cwl.statistics.mtype_etype_url_mapping_from_nexus(base: str | None = None, token: str | None = None) tuple[dict, dict]

Get mtype and etype labels mapped to their uris, from nexus.

blue_cwl.statistics.node_population_composition_summary(population: NodePopulation, atlas: Atlas, mtype_urls: dict, etype_urls: dict) dict

Calculate the composition summary statistics of a node population.