uvisbox.Modules.SquidGlyphs.squid_glyphs_stats
Module Contents
- uvisbox.Modules.SquidGlyphs.squid_glyphs_stats.squid_glyphs_2d_summary_statistics(ensemble_vectors, percentile, workers=None)[source]
Compute vector depth statistics for 2D squid glyphs.
- Parameters:
ensemble_vectors (numpy.ndarray) – Shape (n, m, 2) - Cartesian ensemble vectors
percentile (float) – Percentile of ensemble members to include based on depth ranking (0-100). Higher values include more vectors (larger glyphs showing more variation). For example, 50 includes the deepest 50%, 95 includes the deepest 95%, and 100 includes all vectors.
workers (int, optional) – Number of parallel workers for depth computation. Default is None (sequential)
- Returns:
stats_2d – Contains
ensemble_polar_vectors,depths,median_vectors,magnitudes_min,magnitudes_max,angles_min, andangles_max.- Return type:
dict
- uvisbox.Modules.SquidGlyphs.squid_glyphs_stats.squid_glyphs_3d_summary_statistics(ensemble_vectors, percentile)[source]
Compute vector depth statistics for 3D squid glyphs.
- Parameters:
ensemble_vectors (numpy.ndarray) – Shape (n, m, 3) - Cartesian ensemble vectors
percentile (float) – Percentile of ensemble members to include based on depth ranking (0-100). Higher values include more vectors (larger glyphs showing more variation). For example, 50 includes the deepest 50%, 95 includes the deepest 95%, and 100 includes all vectors.
- Returns:
stats_3d – Contains
ensemble_spherical_vectors,depths,median_vectors,spread_min_vectors,spread_max_vectors,glyph_types,pca_components, andnum_glyphs.- Return type:
dict
- uvisbox.Modules.SquidGlyphs.squid_glyphs_stats.getDirectionalVariations(vectors, depths, percentile, min_vectors, median_vectors, max_vectors)[source]
Compute the directional variation of the vectors.
- Parameters:
vectors (numpy.ndarray) – Array of shape (num_points, num_ensemble_members, 3) where the last dimension contains the vector components.
depths (numpy.ndarray) – Array of shape (num_points, num_ensemble_members) containing depth values for each vector.
percentile (float) – Percentile of ensemble members to include (0-100). Higher values include more vectors.
min_vectors (numpy.ndarray) – Array of shape (num_points, 3) where the last dimension contains the min vector components.
median_vectors (numpy.ndarray) – Array of shape (num_points, 3) where the last dimension contains the median vector components.
max_vectors (numpy.ndarray) – Array of shape (num_points, 3) where the last dimension contains the max vector components.
- Returns:
directional_variation – Array of shape (num_points, 3, 2) where the 3 represents the (pca first component, pca second component, pca mean) and the 2 represents the x and y components of the pca components.
- Return type:
numpy.ndarray