Core.CellsCrossingProb package
Submodules
Core.CellsCrossingProb.crossing_pob_monte_carlo module
- Core.CellsCrossingProb.crossing_pob_monte_carlo.crossing_prob_cubes_mc(F, isovalue, num_samples=200)[source]
Perform probabilistic marching squares on a 2D scalar field with uncertainty. This function calculates the probability of the isocontour passing through each cell in the grid based on an ensemble of scalar fields. The method is based on the paper: Pöthkow, K., Weber, B. and Hege, H.-C. (2011), Probabilistic Marching Cubes. Computer Graphics Forum, 30: 931-940. https://doi.org/10.1111/j.1467-8659.2011.01942.x
Parameters:
- Fnp.ndarray
4D array of shape (n_x, n_y, n_z, n_ens) representing the scalar field with ensemble members.
- isovaluefloat
The isovalue for which to compute the isosurface.
- num_samplesint, optional
Number of samples to draw for estimating the probability of contour presence in each cell.
Returns:
- prob_contournp.ndarray
3D array of shape (n_x-1, n_y-1, n_z-1) with probabilities of contour presence in each cell.
- Core.CellsCrossingProb.crossing_pob_monte_carlo.crossing_prob_squares_mc(F, isovalue, num_samples=200)[source]
Perform probabilistic marching squares on a 2D scalar field with uncertainty. This function calculates the probability of the isocontour passing through each cell in the grid based on an ensemble of scalar fields. The method is based on the paper: K. Pothkow and H. -C. Hege, “Positional Uncertainty of Isocontours: Condition Analysis and Probabilistic Measures,” in IEEE Transactions on Visualization and Computer Graphics, vol. 17, no. 10, pp. 1393-1406, Oct. 2011, doi: 10.1109/TVCG.2010.247
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 contour.
- num_samplesint, optional
Number of samples to draw for estimating the probability of contour presence in each cell.
Returns:
- prob_contournp.ndarray
2D array of shape (n-1, m-1) with probabilities of contour presence in each cell.
- Core.CellsCrossingProb.crossing_pob_monte_carlo.crossing_prob_tetrahedra_mc(F, tetrahedra, isovalue, num_samples=200)[source]
Perform probabilistic marching squares on a 2D scalar field with uncertainty. This function calculates the probability of the isocontour passing through each triangle in the triangulated mesh based on an ensemble of scalar fields.
Parameters:
- Fnp.ndarray
2D array of shape (n_points, n_ens) representing the scalar field with ensemble members.
- tetrahedranp.ndarray
2D array of shape (n_tetrahedra, 4) representing the triangulation of the points.
- isovaluefloat
The isovalue for which to compute the contour.
- num_samplesint, optional
Number of samples to draw for estimating the probability of contour presence in each cell.
Returns:
- prob_contournp.ndarray
1D array of shape (n_tetrahedra,) with probabilities of contour presence in each tetrahedron.
- Core.CellsCrossingProb.crossing_pob_monte_carlo.crossing_prob_triangles_mc(F, triangles, isovalue, num_samples=200)[source]
Perform probabilistic marching triangles on a 2D scalar field with uncertainty. This function calculatesthe probability of the isocontour passing through each triangle in the triangulated mesh based on an ensemble of scalar fields.
The method is based on the paper: Pöthkow, K., Petz, C. and Hege, H.C., 2013. Approximate level-crossing probabilities for interactive visualization of uncertain isocontours. International Journal for Uncertainty Quantification, 3(2). doi: 10.1615/Int.J.UncertaintyQuantification.2012003958
Parameters:
- Fnp.ndarray
2D array of shape (n_points, n_ens) representing the scalar field with ensemble members.
- trianglesnp.ndarray
2D array of shape (n_triangles, 3) representing the triangulation of the points.
- isovaluefloat
The isovalue for which to compute the contour.
- num_samplesint, optional
Number of samples to draw for estimating the probability of contour presence in each cell.
Returns:
- prob_contournp.ndarray
1D array of shape (n_triangles,) with probabilities of contour presence in each triangle.
Module contents
Core CellCrossingProb Module
This module contains core functionality for cell crossing probability calculations. These are fundamental algorithms for probabilistic analysis used across the UVisBox package.