polartoolkit.get_min_max#
- get_min_max(values, shapefile=None, robust=False, region=None, hemisphere=None, epsg=None, absolute=False, robust_percentiles=(0.02, 0.98))[source]#
Get a grids max and min values.
- Parameters:
values (
DataArray|Series|ndarray[tuple[Any,...],dtype[TypeVar(_ScalarT, bound=generic)]]) β values to find min or max forshapefile (
str|GeoDataFrame|None) β path or loaded shapefile to use for a mask, by default Nonerobust (
bool) β choose whether to return the 2nd and 98th percentile values, instead of the min/maxregion (
tuple[float,float,float,float] |None) β give a subset region to get min and max values from, in format [xmin, xmax, ymin, ymax], by default Nonehemisphere (
str|None) β if using a shapefile to subset the data, set projection based on βnorthβ or βsouthβ hemispheres, by default Noneepsg (
str|None) β if using a shapefile to subset the data, set projection from EPSG code string (β3031β), by default Noneabsolute (
bool) β return the absolute min and max values, by default Falserobust_percentiles (
tuple[float,float]) β decimal percentiles to use for robust min and max, by default (0.02, 0.98)
- Returns:
returns the min and max values.
- Return type: