Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  WCS_CHECK_CTYPE

WCS_CHECK_CTYPE

WCS_CHECK_CTYPE

Name


    WCS_CHECK_CTYPE

Purpose


    Checks that a pair of CTYPE parameters conform to WCS format and return
    the projection type and coordinate type extracted from them.

Explanation



    Stops with an error message if CTYPE does not conform to standard,
    unless one or both CTYPE strings is missing.
    If only CTYPE[0] is present, and is valid, this counts as a
    "pass".
    If ctype is unset, returns silently, with coord_type = 'X' and
    projection_type = 'DEF'.
    Low-level procedure extracted from WCSXY2SPH & WCSSPH2XY to reduce code
    duplication.

Category


    Mapping and Auxiliary FITS Routine

Calling Sequence


      wcs_check_ctype, ctype, projection_type, [coord_type]

Input Parameters


    ctype - astrometry-related CTYPE strings extracted from the header.

Output Parameters


    projection_type - three-character code specifying map projection.
                      If ctype is not specified returns 'DEF' for default.
    coord_type - one- or two-character code specifying the coordinate
                      type, 'X' (unknown) if not specified. 'C' for RA & Dec.

Notes


      The conventions followed here check consistency with
      "Representations of Celestial Coordinates in FITS" by Calabretta
      and Greisen (2002, A&A, 395, 1077; also see
      http://fits.gsfc.nasa.gov/fits_wcs.html).

Procedure


      Astrometry CTYPEs should come in longitude and latitude pairs in one
      of three formats: 'RA---xxx' & 'DEC--xxx', 'yLON-xxx' & 'yLAT-xxx', or
      'zzLN-xxx' & 'zzLT-xxx' where xxx is the projection code and y or zz
      specify the type of the latitude & longitude axes, e.g. Galactic,
      Ecliptic etc. If the CTYPE pair is in this format, xxx is returned as
      the projection type.

Common Blocks


      none

Procedures Called


      none

Author



      J. P. Leahy

Modifications/revision Level



      1.0 Jul 2013 Extracted from WCSXY2SPH & WCSSPH2XY
      1.1 Aug 2013 Now does actually stop if error detected.
      1.2 Jan 2014 Recognize when RA, DEC reversed, W. Landsman



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us