Modules.ProbabilisticMarchingTriangles package

Submodules

Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles module

Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles.probabilistic_marching_triangles(F, points, triangles, isovalue, prob_contour=None, cmap='viridis', ax=None)[source]

Visualize the probabilistic marching triangles result using matplotlib.

Parameters:

Fnp.ndarray

2D array of shape (n_points, n_ens) representing the scalar field with ensemble members.

pointsnp.ndarray

2D array of shape (n_points, 2) with point coordinates.

trianglesnp.ndarray

2D array of shape (n_triangles, 3) with triangle indices.

isovaluefloat

The isovalue for which to compute the isocontour.

prob_contournp.ndarray, optional

1D array with probabilities of contour presence in each triangle. If None, it will be computed using probabilistic_marching_triangles function.

cmapstr, optional

Colormap for the probability map. Default is ‘viridis’.

axmatplotlib axis, optional

The axis to draw on. If None, a new figure and axis will be created.

Returns:

axmatplotlib axis

The axis with the visualized probabilistic isocontour.

Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles_stats module

Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles_vis module

Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles_vis.matplotlib_probabilistic_marching_triangles_vis(points, triangles, prob_contour, cmap='viridis', ax=None)[source]

Visualize the probability map of isocontour presence using matplotlib.

Parameters:

pointsnp.ndarray

2D array of shape (n_points, 2) representing the coordinates of the points.

trianglesnp.ndarray

2D array of shape (n_triangles, 3) representing the triangulation of the points.

prob_contournp.ndarray

1D array of shape (n_triangles,) with probabilities of contour presence in each triangle.

cmapstr, optional

Colormap for the probability map. Default is ‘viridis’.

axmatplotlib axis, optional

The axis to draw on. If None, a new figure and axis will be created.

Returns:

axmatplotlib axis

The axis with the visualized probabilistic isocontour.

Module contents

ProbabilisticMarchingTriangles Module This module provides functionality for performing probabilistic marching triangles on 2D triangular meshes with uncertainty. It includes methods for calculating triangle crossing probabilities and visualizing the results using matplotlib.