improver.percentile module¶
Module containing percentiling classes.
-
class
improver.percentile.PercentileConverter(collapse_coord, percentiles=None, fast_percentile_method=True)[source]¶ Bases:
improver.BasePluginPlugin for converting from a set of values to a PDF.
Generate percentiles together with min, max, mean, stdev.
-
__init__(collapse_coord, percentiles=None, fast_percentile_method=True)[source]¶ Create a PDF plugin with a given source plugin.
- Parameters
collapse_coord (str or list of str) – The name of the coordinate(s) to collapse over. This coordinate(s) will no longer be present on the output cube, as it will have been replaced by the percentile coordinate.
percentiles (Iterable list of float or None) – Percentile values at which to calculate; if not provided uses DEFAULT_PERCENTILES. (optional)
- Raises
TypeError – If collapse_coord is not a string.
-
_abc_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version= 213¶
-
_abc_registry= <_weakrefset.WeakSet object>¶
-
process(cube)[source]¶ Create a cube containing the percentiles as a new dimension.
- What’s generated by default is:
15 percentiles - (0%, 5%, 10%, 20%, 25%, 30%, 40%, 50%, 60%, 70%, 75%, 80%, 90%, 95%, 100%)
- Parameters
cube (iris.cube.Cube) – Given the collapse coordinate, convert the set of values along that coordinate into a PDF and extract percentiles.
- Returns
A single merged cube of all the cubes produced by each percentile collapse.
- Return type
-