fitsmgmt.wcs.make_zoomed_wcs

fitsmgmt.wcs.make_zoomed_wcs(wcs_ref, shape, zoom)

Resample a linear WCS onto a finer pixel grid covering the same sky.

Returns a new WCS and shape describing the same on-sky footprint as wcs_ref/shape, but sampled zoom times finer per axis. Uses the edge-aligned affine map x' = zoom * (x - 0.5) + 0.5 applied to CRPIX (FITS 1-indexed convention throughout), which keeps pixel-grid edges (not just centers) aligned between the two grids – important when the zoomed grid will be compared pixel-by-pixel against data resampled separately onto the same nominal footprint.

Parameters

wcs_ref : astropy.wcs.WCS

Reference WCS. Must be linear (i.e. have a usable wcs.cd and wcs.crpix), such as one returned by make_linear_wcs.

shape : tuple of int

(ny, nx) of the reference grid.

zoom : int or float

Linear oversampling factor (e.g. zoom=4 gives 4x finer pixels along each axis).

Returns

wcs_zoom : astropy.wcs.WCS

The zoomed WCS.

shape_zoom : tuple of int

(ny * zoom, nx * zoom).