; COPIXEL
;---------------------------------------------------------------
;! Convert between physical and pixel coordinate values
;# VERB COORDINATES
;-----------------------------------------------------------------------
;;  Copyright (C) 2000, 2003, 2007, 2009
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
COPIXEL   LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
COPIXEL:  Verb to convert between physical and pixel coordinates
          Input adverbs
INNAME                             Image name(name).
INCLASS                            Image name(class).
INSEQ           0.0      9999.0    Image name(seq. #). 0=>high
INDISK          0.0         9.0    Disk drive #. 0=>any
OPTYPE                             'PIXE' => pixel -> coord
                                   else coord -> pixel
         $Input/output adverbs
COORDINA $                         Coordinate in image
PIXXY    $    0.0                  Pixel location (X,Y,...)
         @output adverb
ERROR    @     -1.0         1.0    Error in coordinates?
----------------------------------------------------------------
COPIXEL
Type:  verb
Use:   To convert between physical and pixel coordinates in an image.
Input adverbs:
  INNAME.....Image name(name).   Standard defaults.
  INCLASS....Image name(class).  Standard defaults.
  INSEQ......Image name(seq. #).  0 => highest.
  INDISK.....Disk drive # of image.  0 => any.
  OPTYPE.....'PIXE' => convert PIXXY to COORDINA
             else convert COORDINA to PIXXY
Input/output adverbs
  COORDINA...The X and Y coordinates are found as:
             Xpos = abs(CO(1)) + abs(CO(2))/60 + abs(CO(3))/3600
                if any of CO(1), CO(2), CO(3) < 0: Xpos = -Xpos
             Ypos = abs(CO(4)) + abs(CO(5))/60 + abs(CO(6))/3600
                if any of CO(4), CO(5), CO(6) < 0: Ypos = -Ypos
             Note that, although these are most suited to RA, Dec in
             sexagesimal notation, they can be used for any type of
             coordinate.  The units are standard FITS units (e.g
             degrees, m/sec, Hz, sec, etc.) except that right
             ascensions are in hours of time.
  PIXXY......Pixel coordinates, only the first two values are changed.
             PIXXY(3)-PIXXY(7) are used to set the depth into the
             image which may affect the first two coordinate values.
Output adverb:
  ERROR......1 => there was an error (namely PIXXY was outside the
             image for the specified COORDINA or the input PIXXY was
             outside the image).  -1 => no error.
----------------------------------------------------------------
