      SUBROUTINE ZPHAC(GCOUNT,INTPHD,THRESH,T0,DELT,COUNTS)

      INTEGER GCOUNT
      DOUBLE PRECISION INTPHD(GCOUNT,512)
      DOUBLE PRECISION THRESH(512)
      DOUBLE PRECISION T0, DELT
      REAL COUNTS(512)
      INTEGER I

      DO 40 I = 1, 512
         J = ((THRESH(I) - T0) / DELT) + 1
         IF(J.GE.1.AND.J.LE.GCOUNT)THEN
            COUNTS(I) = INTPHD(J,I)
         ELSE
            COUNTS(I) = 0.D0
         ENDIF
 40   CONTINUE

      RETURN
      END
