uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh ====================================================== .. py:module:: uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh Module Contents --------------- .. py:function:: expcos(x, e) .. py:function:: expsin(x, e) .. py:function:: compute_alignment_scores(reference, target, shifts) Compute alignment scores for all possible shifts of target relative to reference. :param reference: Reference point set (shape: n_points × num_dims) :type reference: np.ndarray :param target: Target point set to align (shape: n_points × num_dims) :type target: np.ndarray :param shifts: Array of shift values to try :type shifts: np.ndarray :returns: Scores for each shift (lower is better) :rtype: np.ndarray .. py:function:: apply_circular_alignment(points, best_shift, best_is_reversed) Apply circular alignment transformation to a set of points based on the calculated shift and orientation. :param points (np.ndarray): Points to transform (shape: n_points × num_dims) :param best_shift (int): Number of positions to shift :param best_is_reversed (bool): Whether to reverse point order :returns: * *aligned (np.ndarray)* -- Transformed points * *point_correspondence_map (np.ndarray)* -- Index mapping from original to transformed points .. py:function:: circular_align_min_twist(points_ref, points_target, stride=1) Aligns two sets of points forming closed loops with minimal twist. :param points_ref (np.ndarray): Reference point set (shape: n_points × num_dims) :param points_target (np.ndarray): Target point set to align (shape: n_points × num_dims) :param stride (int): Stride for sampling subset of points (for efficiency) :returns: * *aligned_points (np.ndarray)* -- Aligned target points * *correspondence_map (np.ndarray)* -- Index mapping from original to aligned points .. py:function:: calculate_mesh_dimensions(n_steps, n_seeds, resolution) Calculate dimensions needed for mesh arrays. .. py:function:: align_cross_sections(ellipsoids, seed_idx, n_steps, resolution) Align cross-sections to minimize twisting for a given seed. .. py:function:: uncertainty_tubes_mesh(summary_statistics, resolution=20, e_proj=1, sym=False, n_jobs=1) Generate the 3D mesh for uncertainty tubes. :param summary_statistics (dict): Dictionary containing "mean_trajectory", "eigen_values", and "eigen_vectors". :param resolution (int: Number of points to sample on each cross-section boundary. Defaults to 20. :param optional): Number of points to sample on each cross-section boundary. Defaults to 20. :param e_proj (float: Exponent controlling the superellipse shape. e_proj=1 creates a standard ellipse. Defaults to 1. :param optional): Exponent controlling the superellipse shape. e_proj=1 creates a standard ellipse. Defaults to 1. :param sym (bool: If True, forces the superellipse to be symmetric. Defaults to False. :param optional): If True, forces the superellipse to be symmetric. Defaults to False. :param n_jobs (int: Number of parallel jobs to use. If n_jobs=1, uses sequential processing. Defaults to 1. :param optional): Number of parallel jobs to use. If n_jobs=1, uses sequential processing. Defaults to 1. :returns: - "vertices" (np.ndarray): Tube mesh vertices. - "faces" (np.ndarray): Triangle indices. - "uv_coords" (np.ndarray): UV coordinates for texture mapping. :rtype: dict