idlastro / FITS Astrometry and Calibration: WCS_DEMO

[Source code]

NAME
WCS_DEMO
PURPOSE
Demonstrate the basic capabilities of procedures WCSSPH2XY & WCSXY2SPH
CATEGORY
Mapping and Auxilary FITS Demo Routine
CALLING SEQUENCE
.run wcs_demo: compiles wcs_demo and the supporting demo routines
wcs_demo: run the demo
INPUT PARAMETERS
none
OUTPUT PARAMETERS
none
PROCEDURE
This is a demo program which is meant to call the routines 
wcssph2xy.pro and wcsxy2sph.pro.  Since the purpose of this
routine is both to show what the routines can do and what the
user has to do, a file is created with all of the commands 
needed to complete the desired operation.  Wcs_demo actually 
executes this command file, so the user can exactly duplicate
the results by simply re-executing this file.  Also, this 
allows a user to edit an already existing file which calls 
wcssph2xy.pro and wcsxy2sph.pro properly and extend the file's
usefulness.  This demo program allows several possible tests.
The first option is to simply draw a grid of evenly spaced
latitude and longitude lines in a particular map transformation.
Another possibility is to do a full loop, creating a Cartesian
grid of latitude and longitude lines and calling wcssph2xy.pro
to convert them to a particular map.  Then, wcsxy2sph.pro is
called to invert the process and the difference between the
original and final latitudes and longitudes can be plotted.
This allows one to assess the level of the numerical errors
introduced by the mapping routines.  A third possible option is to
look at some of the map transformations and include rotations of
the reference points so that a different perspective is given.
COMMON BLOCKS
none
PROCEDURES CALLED
SPHDIST(), WCSXY2SPH, WCSSPH2XY
COPYRIGHT NOTICE
This software has been authored by an employee or employees of Los Alamos 
National Security, LLC, operator of the Los Alamos National Laboratory (LANL) 
under Contract No. DE-AC52-06NA25396 with the U.S. Department of Energy.  The U.S.
Government has rights to use, reproduce, and distribute this software.  The public
may copy, distribute, prepare derivative works and publicly display this software 
without charge, provided that this Notice and any statement of authorship are 
reproduced on all copies.  Neither the Government nor LANS makes any warranty, 
express or implied, or assumes any liability or responsibility for the use of this
software.  If software is modified to produce derivative works, such modified 
software should be clearly marked, so as not to confuse it with the version 
available from LANL.
AUTHOR
Rick Balsano
MODIFICATIONS/REVISION LEVEL
1.1     8/31/93
1.2     3/19/96 - J. Bloch - LANL
                 - Made compatible with wcslib-2.2 by Calabretta.
Converted to IDL V5.0   W. Landsman   September 1997
Updated for conical projections W. Landsman  July 2003