path_to_footprints

astrocut.path_to_footprints(path, size, img_wcs, max_pixels=10000)[source]

Given a path that intersects with a wcs footprint, return one or more rectangles that fully contain that intersection (plus padding given by ‘size’) with each rectangle no more than max_pixels in size.

Parameters
pathSkyCoord

SkyCoord object list of coordinates that represent a continuous path.

sizearray

Size of the rectangle centered on the path locations that must be included in the returned footprint(s). Formatted as [ny,nx]

img_wcsWCS

WCS object the path intersects with. Must include naxis information.

max_pixelsint

Optional, default 10000. The maximum area in pixels for individual footprints.

Returns
responselist

List of footprints, each a dictionary of the form: {‘center_coord’: SkyCoord, ‘size’: [ny,nx]}