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()
andscale_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_hdr
astropy.io.fits.Header
FITS header containing the WCS.
- zoom_factorfloat
See
scipy.ndimage.zoom()
.- debugbool
If
True
, print extra information to screen.
- input_hdr
- Returns:
- hdr
astropy.io.fits.Header
Simple FITS header containing the rescaled WCS.
- hdr
- Raises:
- ValueError
Invalid WCS.