improver.percentile module#
Module containing percentiling classes.
- class PercentileConverter(collapse_coord, percentiles=None, retained_coordinates=None, fast_percentile_method=True)[source]#
Bases:
BasePluginPlugin for converting from a set of values to a PDF.
Generate percentiles together with min, max, mean, stdev.
- __init__(collapse_coord, percentiles=None, retained_coordinates=None, fast_percentile_method=True)[source]#
Create a PDF plugin with a given source plugin.
- Parameters:
collapse_coord (
Union[str,List[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 (
Optional[List[float]]) – Percentile values at which to calculate; if not provided uses DEFAULT_PERCENTILES. (optional)retained_coordinates (
Union[str,List[str],None]) – Optional list of collapsed coordinates that should be retained in their new scalar form. The default behaviour is to remove the scalar coordinates that result from coordinate collapse.fast_percentile_method (
bool) – If True use the numpy percentile method within Iris, which is much faster than scipy, but cannot handle masked data.
- Raises:
TypeError – If collapse_coord is not a string.
- _abc_impl = <_abc._abc_data object>#