%N ol2pixcg %F $MIR/src/subs/cgsubs.for
%D Convert overlay location in given coordinates to pixels
%P nebk
%: plotting
%B
      subroutine ol2pixcg (lun, pix3, otype, off, dsign, nums, opos, np)

      double precision off(*), nums(*), opos(*), pix3
      integer lun, dsign(2), np
      character*(*) otype(2)
  ---------------------------------------------------------------------
 Convert overlay location from OTYPE units to pixels.  This is
 a conversion from true world coordinates to image pixels

 Input
   lun       Handle of image
   pix3      Third axis pixel (channel) that we are displaying
             this overlay on
   otype     Overlay units  for each axis ('arcsec' etc)
   dsign     SIgn for dms axes. +/-1
   nums      The array of numbers read from the overlay file
             starting with the first one to use here.  These
             are in true coordinates such as those given by IMPOS
   off       Offset to be added to the locations decoded from
             the text file and held in NUMS.  These are in the same
             units as OTYPE so no conversion is done.  Is ignored
             for RA and DEC because I am too lazy.
 Output
   opos      Output location in pixels for x and y
   np        This is the number of locations of the NUMS array used
