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
paddingarcseconds. A circumscribing circle (rather than the exact polygon) keeps the resulting ADQL robust:CIRCLEis universally supported by TAP services, whereasPOLYGONsupport and winding conventions vary.Parameters#
- exposure
lsst.afw.image.Exposure Exposure whose WCS and bounding box define the region.
- padding
float, optional Margin to add around the footprint, in arcseconds.
Returns#
- ra
float Cone center right ascension, in degrees (ICRS).
- dec
float Cone center declination, in degrees (ICRS).
- radius
float Cone radius, in degrees.
Raises#
- ValueError
If the exposure has no WCS, an empty bounding box, or negative padding.
- exposure