[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


PUTAST Source code in putast.pro

PUTAST

Name
    PUTAST
Purpose
    Put WCS astrometry parameters into a given FITS header.
Calling Sequence
     putast, hdr              ;Prompt for all values
               or
     putast, hdr, astr, [EQUINOX =, CD_TYPE =, ALT= ]
               or
     putast, hdr, cd,[ crpix, crval, ctype], [ EQUINOX =, CD_TYPE =, ALT= ]
Input Parameters
     HDR -  FITS header, string array.   HDR will be updated to contain
             the supplied astrometry.
     ASTR - IDL structure containing values of the astrometry parameters
            CDELT, CRPIX, CRVAL, CTYPE, LONGPOLE, and PV2
            See EXTAST.PRO for more info about the structure definition
                            or
     CD   - 2 x 2 array containing the astrometry parameters CD1_1 CD1_2
                                                             CD2_1 CD2_2
              in units of DEGREES/PIXEL
     CRPIX - 2 element vector giving X and Y coord of reference pixel
              BE SURE THE COORDINATES IN CRPIX ARE GIVEN IN FITS STANDARD
              (e.g. first pixel in image is [1,1] ) AND NOT IDL STANDARD
              (first pixel in image is [0,0]
     CRVAL - 2 element vector giving R.A. and DEC of reference pixel
               in degrees
     CTYPE - 2 element string vector giving projection types for the two axes.
             For example, to specify a tangent projection one should set
             ctype = ['RA---TAN','DEC--TAN']
Output Parameters
      HDR - FITS header now contains the updated astrometry parameters
               A brief HISTORY record is also added.
Keyword Parameters
       ALT -  single character 'A' through 'Z' or ' ' specifying an alternate
              astrometry system to write in the FITS header.    The default is
              to write primary astrometry or ALT = ' '.   If /ALT is set,
              then this is equivalent to ALT = 'A'.   See Section 3.3 of
              Greisen & Calabretta (2002, A&A, 395, 1061) for information about
              alternate astrometry keywords.
      EQUINOX - numeric scalar giving the year of equinox  of the reference
                coordinates.   Default (if EQUINOX keyword is not already
                present in header) is 2000.
       CD_TYPE - Integer scalar, either 0, 1 or 2 specifying how the CD matrix
                is to be written into the header
               (0) write PCn_m values along with CDELT values
               (1) convert to rotation and write as a CROTA2 value (+ CDELT)
               (2) as CDn_m values (IRAF standard)
            All three forms are valid representations according to Greisen &
            Calabretta (2002, A&A, 395, 1061), also available at
            http://www.aoc.nrao.edu/~egreisen/) although form (0) is preferred.
            Form (1) is the former AIPS standard and is now  deprecated and
            cannot be used if any skew is present.
            If CD_TYPE is not supplied, PUTAST will try to determine the
            type of astrometry already in the header.   If there is no
            astrometry in the header then the default is CD_TYPE = 2.
Note
       The recommended use of this procedure is to supply an astrometry
       structure.
       PUTAST does not delete astrometry parameters already present in the
       header, unless they are explicity overwritten.
Prompts
       If only a header is supplied, the user will be prompted for a plate
       scale, the X and Y coordinates of a reference pixel, the RA and
       DEC of the reference pixel, the equinox of the RA and Dec and a
       rotation angle.
Procedures Used
       GETOPT(), GET_COORDS, GET_EQUINOX, SXADDPAR, SXPAR(), TAG_EXIST(),
       ZPARCHECK
Revision History
       Written by W. Landsman 9-3-87
       Major rewrite, use new astrometry structure   March, 1994
       Use both CD and CDELT to get plate scale for CD_TYPE=1   September 1995
       Use lower case for FITS keyword Comments  W.L.    March 1997
       Fixed for CD_TYPE=1 and CDELT = [1.0,1.0]   W.L   September 1997
       Default value of CD_TYPE is now 2, Use GET_COORDS to read coordinates
       to correct -0 problem           W.L.  September 1997
       Update CROTA1 if it already exists  W.L. October 1997
       Convert rotation to degrees for CD_TYPE = 1  W. L.   June 1998
       Convert to IDL V5.0    W.L. June 1998
       Accept CD_TYPE = 0 keyword input   W.L   October 1998
       Remove reference to obsolete !ERR  W.L.  February 2000
       No longer support CD001001 format, write default tangent CTYPE value
       consistent conversion between CROTA and CD matrix W.L. October 2000
       Use GET_EQUINOX to get equinox value  W.L.  January 2001
       Update CTYPE keyword if previous value is 'LINEAR'  W.L. July 2001
       Use SIZE(/TNAME) instead of DATATYPE()  W.L.   November 2001
       Allow direct specification of CTYPE W.L.        June 2002
       Don't assume celestial coordinates W. Landsman  April 2003
       Make default CD_TYPE = 2  W. Landsman   September 2003
       Add projection parameters, e.g. PV2_1, PV2_2 if present in the
       input structure   W. Landsman    May 2004
       Correct interactive computation of image center W. Landsman Feb. 2005
       Don't use CROTA (CD_TYPE=1) if a skew exists W. Landsman  May 2005

Last modified by pro2html on 2005 May 19 at 03:11 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically