scale_wcs

stginga.utils.scale_wcs(input_hdr, zoom_factor, debug=False)[source]

Rescale FITS WCS by the given zoom factor. This is used in scale_image() and scale_image_with_dq().

Both PC and CD matrices are supported. Distortion is not taken into account; therefore, this does not work on an image with CTYPE that ends in -SIP.

Note

WCS transformation provided by Mihai Cara.

Some warnings are suppressed.

Parameters:
input_hdrastropy.io.fits.Header

FITS header containing the WCS.

zoom_factorfloat

See scipy.ndimage.zoom().

debugbool

If True, print extra information to screen.

Returns:
hdrastropy.io.fits.Header

Simple FITS header containing the rescaled WCS.

Raises:
ValueError

Invalid WCS.