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.images.MaskedImage or lsst.afw.image.Exposure

Image whose sky projection and bounding box define the region, such as an lsst.images.VisitImage. A legacy exposure is converted with as_masked_image.

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 image has no WCS, or padding is negative.