%N scalunit %F $MIR/src/subs/calsubs.for
%D Set calibration unit conversion mode
%: calibration
%P pjt
%B
        INTEGER FUNCTION scalunit(name)

        CHARACTER name*(*)

   Convert a unit string into an integer scaling mode 

       unit        scalmode
       ----        --------
       K           0
       K/jy        1
       K/mjy       2
       K/kjy       3
       jy/K       -1
       mjy/K      -2
       kjy/K      -3
