text:       SUBROUTINE DEBIAS(BUF,OBUF,NSAMPS)
  !     DEBIAS COMPUTES AND REMOVES THE BIAS (THE MEAN OF THE TRACE).
  !  THIS ROUTINE WORKS IN HOST MEMORY.  THE COMPANION AP ROUTINE IS DEMEAN.
  !
  ! COPYRIGHTED BY:
  !  PAUL HENKART, SEISMIC REFLECTION PROCESSORS, SAN DIEGO, CA.
  !  17 JANUARY 1982.  ALL RIGHTS RESERVED.
  !
        DIMENSION BUF(1),OBUF(1)
  !
        REALN=FLOAT(NSAMPS)
        AVE=0.
        DO I=1,NSAMPS
           AVE=AVE+BUF(I)                                                 ! WATCH OUT FOR OVERFLOW - THIS COULD BE BUF(I)/REALN
        ENDDO
        AVE=AVE/REALN                                                     ! BUT SAVING THE DIVIDES WILL REALLY HELP CUT CPU TIME.
        DO I=1,NSAMPS
           OBUF(I)=BUF(I)-AVE
        ENDDO
        RETURN
        END
  