bounding_polygon

grizli.utils.bounding_polygon(x, y, nsteps=16, use_percentiles=True, closed=True, **kwargs)[source]

Compute a bounding polygon of min(y), max(y) as a function of x

Parameters
stepsint

Number of steps sampling from min(x) to max(x)

use_percentilesbool

If true, use steps in evenly spaced percentiles of x, otherwise use evenly spaced steps

closedbool

Close the polygon by duplicating the first point at the last

Returns
px, pyarray-like

Coordinates of the bounding polygon