catalog_bounding_polygon

grizli.utils.catalog_bounding_polygon(ra, dec, cosd=True, scale=3600.0, nsteps=128, buffer=(25, -19), simplify=5.0, as_sregion=True, **kwargs)[source]

Compute a bounding polygon for a list of catalog positions using the intersection of bounding_polygon(ra, dec) and bounding_polygon(dec, ra).

Parameters
ra, decarray-like

Catalog positions. These are assumed to be decimal degrees given the other parameter defaults, but they can be other values

cosdbool

Rescale dx = (ra - median(ra)) by cos(dec)

scalefloat

Additional scale factor of relative coordinates. Default of 3600 scales sky coordinates in decimal degrees to offset arcsec

nstepsint

Number of steps for the bounding polygons

buffer(float, float)

Shapely buffers to apply to the intersection of the y(x) and x(y) polygons.

simplifyfloat

Simplify tolerance on the intersection polygon.

The combination of buffer and simplify reduce the complexity of the output. For sky coordinates and scale=3600, buffer and simplify have units of arcsec.

If simplify < buffer[0] + buffer[1], then the simplified shape should still contain all of the input points.

as_region, kwargsbool, **dict

Return as sregion.SRegion(**dict) object

Returns
ro, doarray-like

Coordinates of the bounding polygon, if as_sregion=False

olapsregion.SRegion

Region object if requested