      SUBROUTINE kevang(dset_new, dset)
c		conversion keV -> Angstrom
c		fwj haberl may 1988
      INCLUDE 'xplot.inc'
      INTEGER*4 dset, dset_new, i, j, iset, jset
      REAL*4 de, conv
      DATA conv/12.4/
 
      IF (dset_new.LT.1) THEN
         WRITE (*, '(a)') ' Command works only on fresh read spectra'
         GOTO 900
      ELSE
         DO iset = 1, dset_new
            jset = dset + iset
            DO i = nbins(jset), nbine(jset)
               buf(i, 1) = conv/datax(i)
               buf(i, 2) = conv/errlx(i)
               buf(i, 3) = conv/errux(i)
               de = abs(errux(i)-errlx(i))
               buf(i, 4) = datay(i)*de
               buf(i, 5) = errly(i)*de
               buf(i, 6) = erruy(i)*de
               buf(i, 7) = modely(i)*de
            ENDDO
            j = nbine(jset)
            DO i = nbins(jset), nbine(jset)
               datax(i) = buf(j, 1)
               errlx(i) = buf(j, 3)
               errux(i) = buf(j, 2)
               datay(i) = buf(j, 4)
               errly(i) = buf(j, 5)
               erruy(i) = buf(j, 6)
               modely(i) = buf(j, 7)
               j = j - 1
            ENDDO
         ENDDO
         ylab(jset) = ' Counts sec'//char(92)//'u-1'//char(92)//
     &                'd cm'//char(92)//'u-2'//char(92)//'d'
         xlab(jset) = ' Angstrom'
      ENDIF
      RETURN
 900  CONTINUE
      dset_new = 0
      RETURN
      END
