idlastro / Astronomical Utilities: ARCBAR

[Source code]

NAME
ARCBAR
PURPOSE
Draw an arc bar on an image showing the astronomical plate scale
CALLING SEQUENCE
ARCBAR, hdr, arclen,[  COLOR= , /DATA, LABEL= , /NORMAL, POSITION=, 
                       /SECONDS, SIZE=, THICK=, FONT= ]
INPUTS
hdr - image FITS header with astrometry, string array
OPTIONAL INPUT
arclen - numeric scalar giving length of bar in arcminutes (default)
        or arcseconds (if /SECONDS is set).    Default is 1 arcminute 
OPTIONAL KEYWORD INPUTS
COLOR - name  or integer scalar specifying the color to draw the arcbar 
        See cgColor for a list of available color names
/DATA - if set and non-zero, then the POSITION keyword and the arc 
        length is given in data units
LABEL - string giving user defined label for bar.  Default label is size
        of bar in arcminutes
/NORMAL - if this keyword is set and non-zero, then POSITION is given in
        normalized units
POSITION - 2 element vector giving the (X,Y) position in device units 
        (or normalized units if /NORMAL is set, or data units if /DATA
        is set) at which to place the  scale bar.   If not supplied, 
        then the user will be prompted to place the cursor at the 
        desired position
/SECONDS - if set, then arlen is specified in arcseconds rather than
        arcminutes
SIZE  - scalar specifying character size of label, default = 1.0
THICK -  Character thickness of the label, default = !P.THICK
FONT - scalar font graphics keyword (-1,0 or 1) for text
EXAMPLE
Suppose one has an image array, IM, and FITS header, HDR, with 
astrometry.    Display the image and place a 3' arc minute scale bar 
at position 300,200 of the current image window
IDL> cgimage, IM, /scale,/save   ;Use /SAVE to set data coordinates
IDL> arcbar, HDR, 3, pos = [300,200],/data
RESTRICTIONS
When using using a device with scalable pixels (e.g. postscript)
the data coordinate system must be established before calling ARCBAR.
If data coordinates are not set, then ARCBAR assumes that the displayed
image size is given by the NAXIS1 keyword in the FITS header.
PROCEDURE CALLS
AD2XY, EXTAST, GSSSADXY, SXPAR(), SETDEFAULTVALUE, cgPlot, cgText
REVISON HISTORY
written by L. Taylor (STX) from ARCBOX (Boothman)
modified for Version 2 IDL,                     B. Pfarr, STX, 4/91
New ASTROMETRY structures               W.Landsman,  HSTX, Jan 94
Recognize a GSSS header                 W. Landsman June 94
Added /NORMAL keyword                   W. Landsman Feb. 96
Use NAXIS1 for postscript if data coords not set,  W. Landsman Aug 96
Fixed typo for postscript W. Landsman   Oct. 96
Account for zeropoint offset in postscript  W. Landsman   Apr 97
Added /DATA, /SECONDS keywords   W. Landsman    July 1998
Use device-independent label offset  W. Landsman   August 2001
Allow font keyword to be passed.  T. Robishaw Apr. 2006
Remove obsolete TVCURSOR command  W. Landsman Jul 2007
Use Coyote Graphics W. Landsman  February 2011
Fix problem using data coordinates when not in postscript 
          W. Landsman January 2013