uvisbox.Modules.SquidGlyphs.squid_glyphs_stats ============================================== .. py:module:: uvisbox.Modules.SquidGlyphs.squid_glyphs_stats Module Contents --------------- .. py:function:: squid_glyphs_2d_summary_statistics(ensemble_vectors, percentile, workers=None) Compute vector depth statistics for 2D squid glyphs. :param ensemble_vectors: Shape (n, m, 2) - Cartesian ensemble vectors :type ensemble_vectors: numpy.ndarray :param percentile: 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. :type percentile: float :param workers: Number of parallel workers for depth computation. Default is None (sequential) :type workers: int, optional :returns: **stats_2d** -- Contains ``ensemble_polar_vectors``, ``depths``, ``median_vectors``, ``magnitudes_min``, ``magnitudes_max``, ``angles_min``, and ``angles_max``. :rtype: dict .. py:function:: squid_glyphs_3d_summary_statistics(ensemble_vectors, percentile) Compute vector depth statistics for 3D squid glyphs. :param ensemble_vectors: Shape (n, m, 3) - Cartesian ensemble vectors :type ensemble_vectors: numpy.ndarray :param percentile: 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. :type percentile: float :returns: **stats_3d** -- Contains ``ensemble_spherical_vectors``, ``depths``, ``median_vectors``, ``spread_min_vectors``, ``spread_max_vectors``, ``glyph_types``, ``pca_components``, and ``num_glyphs``. :rtype: dict .. py:function:: getDirectionalVariations(vectors, depths, percentile, min_vectors, median_vectors, max_vectors) Compute the directional variation of the vectors. :param vectors: Array of shape (num_points, num_ensemble_members, 3) where the last dimension contains the vector components. :type vectors: numpy.ndarray :param depths: Array of shape (num_points, num_ensemble_members) containing depth values for each vector. :type depths: numpy.ndarray :param percentile: Percentile of ensemble members to include (0-100). Higher values include more vectors. :type percentile: float :param min_vectors: Array of shape (num_points, 3) where the last dimension contains the min vector components. :type min_vectors: numpy.ndarray :param median_vectors: Array of shape (num_points, 3) where the last dimension contains the median vector components. :type median_vectors: numpy.ndarray :param max_vectors: Array of shape (num_points, 3) where the last dimension contains the max vector components. :type max_vectors: numpy.ndarray :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. :rtype: numpy.ndarray