TPP=BDATA(J)/YORG 

 IF(TPP.LT.l.E-20) TPP=YORG 

 ■Y=-0.5+AL0G10(TPP)*1. 35714 



42 CALL PL0T(X,Y,2) 

 311 IF(K0UNT-2)78,79,95 



78 K0UNT^2 



COMPUTE WEIGHTS FOR PREWHITENING FILTER AND STORE IN BDATA 



IF(N(l).LE.O) 60 TO 95 



K=l 

 98 NA=N(K)+1 



BDATA(1)=2.0*(CUT(K)+H(K)) 



CENTER WEIGHT STORED IN LOCATION 1 



SUM=0.0 



PI=3. 1415926535898 



COMPUTE REMAINING WEIGHTS 



DO 40 I=2,NA 



P=I-1 



Q=1.0-15.*H(K)**2*P**2 



IF( ABS(Q).GT. 0.0001) GO TO 11 



BDATA(I)= SIN(2.*PI*P*(CUT(K)+H(K)))/(4.0*P) 



GO TO 40 

 11 BDATA(I)=(( C0S(2.*PI*P*H(K)))/Q)*(( SIN(2.*PI*P*(CUT(K)+H(K) ) ) ) 

 1 /(PI*P)) 



40 SUM=SUM+BDATA(I) 



CORRECT WEIGHTS FOR UNITY GAIN 



DELTA=1.-(BDATA(1)+2.*SUM) 



X=2*N(K)+1 



COMPUTE FINAL CORRECTED WEIGHTS, HIGH PASS OR LOW PASS 



IF(K.EQ.2) GO TO 83 



DO 41 1=2, NA 



41 BDATA(I)= (BOATA(I)+ DELTA/X )*(-1.0) 

 BDATA(1)=1.0-(BDATA(1)+DELTA/X) 

 NB=NP-N(K) 



CONVOLVE HIGH PASS WEIGHTS WITH ORIGINAL DATA, STORE IN ADATA 

 235 DO 44 I=NA,NB 

 IA=I-NA+1 

 SUM=0.0 

 DO 43 J=1,NA 

 J1=I+J-1 

 J2=I-J+1 



43 SUM=SUM+BDATA(J)*(DATA(J1) + DATA(J2)) 



44 ADATA(IA)=SUM-BDATA(1)*DATA(I) 

 IF(K.EQ.2) GO TO 236 



STORE PREWHITENED DATA IN DATA AND FILL IN ZEROES 



NJ=NB-N(K) 



DO 51 J=1,NJ 

 51 DATA(J)=ADATA(J) 



NJ=NJ+1 



DO 54 J=NJ,INP 

 54 DATA(J)=0.0 



PUT WEIGHTS IN PROPER ORDER -N.O.N AND STORE IN CDATA 



JJ=N(K)+1 



DO 52 J=1,JJ 



190 



