IF(IPLOT.EQ.l) CALL PL0T(0.0,0.0,3) 



ENVAVG=0.0 

 C—l 



IFdPLOT.NE.l.OR.IBAND.NE.l) GO TO 321 

 C — 1 



DO 44 I=NTWICE,JCT-NTWICE 



AJ=I-1 



C=AJ*.02 



8=AZ(I)*ESCALE 



IF(I.EQ.NTWICE) CALL PL0T(C,B,3) 



CALL PL0T(C,B,2) 



GO TO 322 



321 DO 44 I=NTWICE,JCT-NTWICE 



322 AZ(I)=ABS(AZ(I)) 

 IF(AZ(I).GT.ENVMAX) ENVMAX=AZ(I) 

 ENVAVG=ENVAVG+(AZ( I )/( JCT-2*NUMFIL ) ) 



C ENVELOPE ENERGY IS STORED IN THE APPROPRIATE COLUMNS 

 C OF 2-DIMENSIONAL ARRAY TZ 

 44 TZ(I,IRUN)=AZ(I) 



FRDIFF=FRHIGH(IRUN)-FRLOW(IRUN) 



IF(IPLOT.EQ.l) CALL PL0T(0.0,0.0,3) 



IF(IPLOT.EQ.l) CALL NEWPEN(l) 



DO 836 1=1, XT 



836 AZ(I)=Z(I) 



837 CONTINUE 



C LINEAR REGRESSION OF TEN ENVELOPE ESTIMATES FOR EACH POSITION 

 C FIRST COMPUTE AVERAGE ENVELOPE 



840 DO 841 1=1,10 



FRMEAN( I )=( ( (FRLOW( I )+.017)+FRHIGH( I ) )/2. ) 

 C CONVERT CYCLES/DI TO CYCLES/KM 



841 FRMEAN(I)=FRMEAN(I)*(1./GRIDKM) 

 FR1=(FRL0W(1)+.017)*(1./GRIDKM) 

 FR2=FRHIGH(10)*(1./6RIDKM) 



DO 850 I=NTWICE,JCT-(NTWICE+NFIT) 



DO 846 J=l,10 



ENVEST(J)=0.0 



FIT=FLOAT(NFIT) 



DO 845 K=1,NFIT 



ENVEST(J)=ENVEST(J)+TZ(I+K,J) 



845 CONTINUE 



C IF(FIT.EQ.O.O) GO TO 846 

 ENVEST(J)=ENVEST(J)/FIT 



846 CONTINUE 



C PERFORM ITERATIVE REGRESSION,. STORE B & A IN 

 C COLUMNS 11 & 12 OF ARRAY TZ 



850 CALL P0WFIT(TZ12(I+((NFIT/2)+l)),TZll(I+((NFIT/2)+l)),FRMEAN(l), 

 *ENVEST(1), 10, 0.000001,. 01,0) 

 C PLOT SLOPE PARAMETER B 



IF(IPLOT.NE.l) GO TO 859 



CALL PLOT(0. 0,4. 0,-3) 



CALL :AXES(0.0,0.0,1H ,1,XL,0. ,1. ,0. ,0. ,-2) 



CALL NEWPEN(2) 



153 



