Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
GETROT
Return the rotation and plate scale of an image from its FITS header
Derive the counterclockwise rotation angle, and the X and Y scale factors of an image, from a FITS image header. Input parameter may be either a FITS image header or an astrometry structure (as obtained by EXTAST.PRO)
GETROT, Hdr, [ Rot, CDelt, /SILENT, DEBUG = ] or GETROT, Astr, Rot, CDelt, /SILENT, DEBUG = ]
HDR - FITS Image header (string array). Program will extract the astrometry structure or ASTR - ASTROMETRY structure, of the type returned by EXTAST. See the documentation for EXTAST.PRO for details.
ROT - Scalar giving the counterclockwise rotation of NORTH in DEGREES from the +Y axis of the image. CDELT- 2 element vector giving the scale factors in DEGREES/PIXEL in the X and Y directions. CDELT[1] is always positive, whereas CDELT[0] is negative for a normal left-handed coordinate system, and positive for a right-handed system. If no output variables are supplied (or /DEBUG is set), then GETROT will display the rotation and plate scale at the terminal.
ALT - single character 'A' through 'Z' or ' ' specifying an alternate astrometry system present in the FITS header. See extast.pro for more information on the ALT keyword. Ignored if an astrometry structure rather than FITS header is supplied. DEBUG - if DEBUG is set, GETROT will print the rotation for both the X and Y axis when these values are unequal. If DEBUG is set to 2, then the output parameter ROT will contain both X and Y rotations. /SILENT - if set, then do not provide a warning about a right-handed coordinate system
If the FITS header already contains CDELT (and CD or CROTA) keyword, (as suggested by the Calabretta & Greisen (2002, A&A, 395, 1077) FITS standard) then this is used for the scale factor. If the header contains CD keywords but no CDELT keywords (as in IRAF headers) then the scale factor is derived from the CD matrix.
EXTAST, GSSS_EXTAST
Written W. Landsman STX January 1987 Convert to IDL V2. M. Greason, STX, May 1990 Option to return both rotations added. J. D. Offenberg, STX, Aug 1991 Use new astrometry structure W. Landsman Mar 1994 Recognize a GSSS header W. Landsman June 1994 Converted to IDL V5.0 W. Landsman September 1997 Correct rotation determination with unequal CDELT values WL October 1998 Consistent conversion between CROTA and CD matrix WL October 2000 Correct CDELT computations for rotations near 90 deg WL November 2002 Preserve sign in the CDELT output WL June 2003 Check if latitude/longitude reversed in CTYPE WL February 2004 Fix problem in latitude check M.Lombardi/W.Landsman Sep 2004 Added ALT keyword W. Landsman May 2005
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]