region_from_exposure#

lsst.analysis.ap.region_from_exposure(exposure, padding=5.0)#

Compute a cone (ra, dec, radius) covering an exposure’s sky footprint.

The cone is the smallest circle centered on the exposure’s bounding-box center that contains all four corners, expanded by padding arcseconds. A circumscribing circle (rather than the exact polygon) keeps the resulting ADQL robust: CIRCLE is universally supported by TAP services, whereas POLYGON support and winding conventions vary.

Parameters#

exposurelsst.afw.image.Exposure

Exposure whose WCS and bounding box define the region.

paddingfloat, optional

Margin to add around the footprint, in arcseconds.

Returns#

rafloat

Cone center right ascension, in degrees (ICRS).

decfloat

Cone center declination, in degrees (ICRS).

radiusfloat

Cone radius, in degrees.

Raises#

ValueError

If the exposure has no WCS, an empty bounding box, or negative padding.