      SUBROUTINE PRINT(XNU,FF,GG,KD)
C     
C     ROUTINE TO PRINT ARRAYS XNU, FF AND GG    
C     
      DIMENSION XNU(1),FF(1),GG(1)  
      READ *,KS,KE
      IF(KS.LT.0)THEN   
C     
C       SECTION TO PRINT ONLY THOSE PARTS OF THE SPECTRUM WITH    
C       AMPLITUDES GREATER THAN (FF MAX / KS, KS<10) OR     
C       (FF MAX * KS/100, KS>=10)   
C     
        IF(IABS(KS).LT.10.0)FACT=MAX(FLOAT(IABS(KS)),2.0)    
        IF(IABS(KS).GE.10.0)FACT=1.0/(IABS(KS)/100.0)   
        KS=1
        KE=KD     
        GO TO 50  
      END IF
      PRINT 10    
      PRINT 30    
      IF(KS.EQ.0)KS=1   
      IF(KE.EQ.0)KE=KD  
   10 FORMAT(16X,1HI,7X,9HFREQUENCY,8X,6HPERIOD,8X,6HAMPLIT,5X,   
     *       9HPS WINDOW)     
      PRINT 20,(I,XNU(I),1.0/MAX(XNU(I),1.0E-10),FF(I),GG(I),I=KS,KE)    
   20 FORMAT(12X,I5,1PE16.8,0PG14.6,1PE14.5,E14.5)    
      PRINT 30    
   30 FORMAT(12X,63(1H=))     
      RETURN
C     
   50 AMAX=0.0    
      DO 55 K=KS,KE     
        IF(AMAX.LT.FF(K))AMAX=FF(K) 
   55 CONTINUE    
      PRINT 60,AMAX/FACT
   60 FORMAT(12X,'ALL AMPLITUDES GREATER THAN ',1PE13.4,' PRINTED')     
      PRINT 10    
      PRINT 30    
      DO 70 J=KS,KE     
        IF(J.GT.KS.AND.J.LT.KE.AND.FF(J).LT.AMAX/FACT)THEN  
          IF(ISKIP.EQ.0)THEN  
            ISKIP=1     
            PRINT *,' ' 
          END IF  
          GO TO 70
        END IF    
        ISKIP=0   
        PRINT 20,J,XNU(J),1.0/MAX(XNU(J),1.0E-10),FF(J),GG(J)
   70 CONTINUE    
      PRINT 30    
      RETURN
      END   
