uvisbox.Modules.ContourBoxplot.contour_boxplot_stats
Module Contents
- uvisbox.Modules.ContourBoxplot.contour_boxplot_stats.contour_boxplot_summary_statistics(ensemble_images, isovalue, boxplot_style=None, eps=0, workers=11)[source]
Compute summary statistics for contour boxplot from ensemble scalar fields.
This function extracts binary contours at the given isovalue, computes their band depths, and generates percentile bands, median, and outlier information.
- Parameters:
ensemble_images (np.ndarray) – 3D array of shape (n_ensemble, height, width) containing ensemble scalar fields.
isovalue (float) – Threshold value for creating binary images. Pixels with values < isovalue are set to 1 (inside), values >= isovalue are set to 0 (outside).
boxplot_style (BoxplotStyleConfig, optional) – Configuration for percentiles and outlier detection. If None, uses default configuration.
eps (float, optional) – Epsilon tolerance for subset checks in band depth computation. With eps=0 (default), exact pixel-level containment is required, which can be too strict for continuously-varying rasterized contours. Values like 0.01-0.05 allow approximate containment.
workers (int, optional) – Number of parallel workers for band depth computation. Default is 11.
- Returns:
Contains
median,percentile_bands,outliers,sorted_contours,sorted_indices, anddepths. The median and outliers are binary images. Each percentile-band tuple contains a percentile and a 2D image whose nonzero value is that percentile divided by 100.- Return type:
dict
Examples
>>> ensemble = np.random.randn(50, 100, 100) >>> stats = contour_boxplot_summary_statistics(ensemble, isovalue=0.5) >>> print(stats.keys()) dict_keys(['median', 'percentile_bands', 'outliers', 'sorted_contours', 'sorted_indices', 'depths'])