C CI Read raw real data and convert to complex data for calculation. COMPLEX TARGET(100,4,21) REAL kgateleft,kgateright,RAW(42) INTEGER NPTS,NTRACE,MEASFLAG(3) CHARACTER*12,FILENAME character ang*2,title*4,p*1,filez*60,TYPE*1,label*11 character amark*1 C CI c50 continue c c print*,'Enter incidence angle in degrees:' c read(*,'(a2)')ang c print*,'Read number of files to be combined at this', c # 'angle:' c read(*,'(i1)')NI C c do 21,i = 1,ni c print*,'Enter filename for file # ',i c read(*,'(a12)')filename(i) c filez =filename(i) c nfile = 12+i c open(nfile,file=filename(i)) c21 CONTINUE c c print*,'Enter short (4 letters) file specifier for', c # 'output files:' read(*,'(a4)')title 50 continue i=1 c print*,'Enter filename for file # ',i read(*,'(a12)')filename if (filename .eq. 'stopstopstop') then goto 37 else continue end if i=1 nfile = 12+i open(nfile,file=filename) label=filename (2:12) amark=filename (12:12) ang=amark//'0' ni=1 NPTS = 21 NTOTAL = 0 DO 25,I=1,NI READ(12+i,2000) NTRACE,NFREQ,KGATELEFT,KGATERIGHT PRINT*,NTRACE,NFREQ, # KGATELEFT,KGATERIGHT 2000 format(1x,i2,12x,i1,13x,f5.1,9x,f5.1) C C C IF(NFREQ.EQ.1)THEN TYPE = 'l' ELSEIF(NFREQ.EQ.2)THEN TYPE = 'c' ELSE TYPE = 'x' ENDIF C DO 10 IT=NTOTAL +1,NTOTAL +NTRACE DO 12 IP=1,4 read(12+i,*) (raw(k),k=1,npts*2) DO 14 J=1,NPTS J2=J*2-1 14 TARGET(IT,IP,J)=CMPLX(RAW(J2),RAW(J2+1)) c14 print*,'target(',it,ip,j,') = ',target(it,ip,j) 12 CONTINUE 10 CONTINUE NTOTAL = NTOTAL + NTRACE 25 CONTINUE DO 15 I=1,NI CLOSE(12+I) 15 CONTINUE C 9 C do 30 it=1,ntrace C print *, (20.0*alog10(cabs(target(1,it,1,i,11))),i=1,4) C & ,(20.0*alog10(cabs(target(1,it,2,i,11))),i=1,4) C & ,(20.0*alog10(cabs(target(1,it,3,i,11))),i=1,4) C 30 continue C C OPEN(10,FILE=TYPE//label) C C DO 20 I=1,NI DO 20 IT=1,NTOTAL C DO 20 IP=1,4 WRITE(10,*) ' T=',IT,' P=',IP DO 20 ID=1,NPTS WRITE(10,*) TARGET(IT,IP,ID) 20 CONTINUE CLOSE(10) if (type .eq. 'l') then call subcall(ntrace,type,ang,label,title) else if (type .eq. 'c') then call subcalc(ntrace,type,ang,label,title) else call subcalx(ntrace,type,ang,label,title) endif C c print'(1X,A20)','Do another set (y,n)?' c read(*,'(a1)')p c if(p.eq.'y'.OR.P.EQ.'Y')goto 50 goto 50 37 continue STOP END