Modules.ProbabilisticMarchingSquares package

Submodules

Modules.ProbabilisticMarchingSquares.plot module

Modules.ProbabilisticMarchingSquares.plot.plot(F, isovalue, prob_contour=None, cmap='viridis', ax=None)[source]

Visualize the probabilistic marching squares result using matplotlib.

Parameters:

Fnp.ndarray

3D array of shape (n, m, n_ens) representing the scalar field with ensemble members.

isovaluefloat

The isovalue for which to compute the isocontour.

prob_contournp.ndarray, optional

2D array of shape (n-1, m-1) with probabilities of contour presence in each cell. If None, it will be computed using probabilistic_marching_squares 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.ProbabilisticMarchingSquares.probabilistic_marching_squares module

Modules.ProbabilisticMarchingSquares.probabilistic_marching_squares.probabilistic_marching_squares(F, isovalue, prob_contour=None, cmap='viridis', ax=None)[source]

Visualize the probabilistic marching squares result using matplotlib.

Parameters:

Fnp.ndarray

3D array of shape (n, m, n_ens) representing the scalar field with ensemble members.

isovaluefloat

The isovalue for which to compute the isocontour.

prob_contournp.ndarray, optional

2D array of shape (n-1, m-1) with probabilities of contour presence in each cell. If None, it will be computed using probabilistic_marching_squares function.

cmapstr, optional

Colormap for the visualization. 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.ProbabilisticMarchingSquares.probabilistic_marching_squares_stats module

Modules.ProbabilisticMarchingSquares.probabilistic_marching_squares_vis module

Modules.ProbabilisticMarchingSquares.probabilistic_marching_squares_vis.matplotlib_probabilistic_marching_squares_vis(prob_contour, cmap='viridis', ax=None)[source]

Visualize the probability map of isocontour presence using matplotlib.

Parameters:

prob_contournp.ndarray

2D array of shape (n-1, m-1) with probabilities of contour presence in each cell.

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

ProbabilisticMarchingSquares Module This module provides functionality for performing probabilistic marching squares on 2D datasets with uncertainty. It includes methods for calculating cell crossing probabilities and visualizing the results using matplotlib.