idlastro / FITS Astrometry and Calibration: MAKE_ASTR

[Source code]

NAME
MAKE_ASTR
PURPOSE
Build an astrometry structure from input parameter values
EXPLANATION
This structure can be subsequently placed in a FITS header with 
PUTAST
CALLING SEQUENCE
MAKE_ASTR, astr, CRPIX =, CRVAL =, [CD = , DELT =,  CTYPE =,    $
        LATPOLE = , LONGPOLE =, PV2 =, NAXIS =, AXES =, PV1 =,  $
        RADECSYS =, EQUINOX =, DATEOBS =, MJDOBS =]
OUTPUT PARAMETER
ASTR - Anonymous structure containing astrometry info.  See the 
       documentation for EXTAST for descriptions of the individual
       tags
REQUIRED INPUT KEYWORDS
CRPIX - 2 element vector giving X and Y coordinates of reference pixel
        (def = NAXIS/2).  VALUES MUST BE IN FITS CONVENTION (first pixel
        is [1,1]) AND NOT IDL CONVENTION (first pixel is [0,0]).
CRVAL - 2 element double precision vector giving R.A. and DEC of 
        reference pixel in DEGREES
OPTIONAL INPUT KEYWORDS
CD -  2 x 2 array containing the astrometry parameters CD1_1 CD1_2
       in DEGREES/PIXEL                                CD2_1 CD2_2
DELT - 2 element vector giving physical increment at reference pixel
       in DEGREES/PIXEL default = [-1.0D, 1.0D]/3600.  (1 arcsec/pixel)
CTYPE - 2 element string vector giving projection types, default
       ['RA---TAN','DEC--TAN']
LATPOLE - Scalar latitude of the north pole, default = +90
LONGPOLE - scalar longitude of north pole
PV2 - Vector of projection parameters associated with latitude axis.   
      Not required for some projections (e.g. TAN) and optional for 
      others (e.g. SIN).
      Usually a 2 element vector, but may contain up to 21 elements
      for the Zenithal Polynomial (ZPN) projection.   Corresponds to 
      the keywords PV2_1, PV2_2...  Defaults to 0.0
dded for version 2 astrometry structure:
XES  - 2 element integer vector giving the FITS-convention axis 
       numbers associated with astrometry, in ascending order. 
       Default [1,2].
AXIS - 2 element integer vector giving number of pixels on each axis
V1 -  Vector of projection parameters associated with longitude axis
      Elements 4 & 5 (if present) are equivalent to LONGPOLE & LATPOLE 
      and take precedence if both are specified, i.e. LONGPOLE & LATPOLE
      in the structure are forced to agree with PV1.
ADECSYS - String giving RA/Dec system e.g. 'FK4', 'ICRS' etc.
QUINOX  - Double giving the epoch of the mean equator and equinox
ATEOBS  - Text string giving (start) date/time of observations
JDOBS   - Modified julian date of start of observations.
       (specify one or other of DATEOBS or MJDOBS)
NOTES
(1) An anonymous structure is created to avoid structure definition
        conflicts.    This is needed because some projection systems
        require additional dimensions (i.e. spherical cube
        projections require a specification of the cube face).
(2) The name of the keyword for the CDELT parameter is DELT because
        the IDL keyword CDELT would conflict with the CD keyword
(3) The astrometry structure definition was slightly modified in 
        July 2003; all angles are now double precision, and the 
        LATPOLE tag was added.   In April 2007 the CRPIX tag was also
        changed to double precision.
REVISION HISTORY
Written by   W. Landsman              Mar. 1994
Added LATPOLE, all angles double precision  W. Landsman July 2003
Use PV2 keyword rather than PROJP1, PROJP2 W. Landsman May 2004
Make .CRPIX tag double precision, change CDELT default to 1"/pixel
               W. Landsman April 2007
 Default plate scale is now 1"/pixel (not 1 deg/pix)  WL  Oct. 2010
 Oct 2010 change should only apply when CD matrix not given 
              M. Cushing/W.L.  Aug 2011
 added v2 parameters; more filling out of defaults; default 
 LATPOLE changed to 90 (FITS standard) J. P. Leahy Jul 2013