%N ampscal %F $MIR/src/subs/calsubs.for
%D Scale amplitudes of a calibrator
%: calibration
%P pjt
%B
        SUBROUTINE ampscal(amp, jyflux, scalmode)

        REAL    amp, jyflux
        INTEGER scalmode

   AmpScal scales the amplitude (in K) of a source according
   to a specified flux(in Jy). The input is usually in K,
   the output amplitude is either K, K/Jy or Jy/K etc.
   depending on the scalmode (see scalunit for valid scalmode's)
   If, for some reason, a division by 0 is apparent, no scaling
   is done. Supposedly the flags should be set for this point
   anyhow.

   Input:
       amp      --  amplitude in K
       jyflux   --  flux in Jansky's
       scalmode --  scaling mode (see FUNCTION scalunit)
   Output:
       amp      --  amplitude in K, K/Jy, Jy/K etc.
