From 6e4abe317d301c583560a0f969c3ca7800a39645 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 11 Sep 2014 00:29:50 +0000 Subject: [PATCH] More work needed... git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4301 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/t1.f90 | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/t1.f90 b/lib/t1.f90 index 5467e5a0c..e15337dfc 100644 --- a/lib/t1.f90 +++ b/lib/t1.f90 @@ -1,13 +1,32 @@ program t1 character*22 msg + character*12 arg complex c3(0:4096-1) complex c5(0:4096-1) - do i=1,999 + call getarg(1,arg) + read(arg,*) nfile + + do ifile=1,999 read(51,end=999) nutc,nsnr,xdt,nfreq,msg,c3,c5 - write(*,1010) nutc,nsnr,xdt,nfreq,msg -1010 format(2i6,f7.1,i6,2x,a22) + write(*,1010) ifile,nutc,nsnr,xdt,nfreq,msg +1010 format(3i6,f7.1,i6,2x,a22) + + if(ifile.eq.nfile) then + c3=c5 + c3(1353:)=0 + call four2a(c3,2048,1,-1,1) + + df=12000.0/(128.0*2048.0) + do i=0,2048 + freq=i*df + if(i.ge.1024) freq=(i-2048)*df + s=1.e-4*(real(c3(i))**2 + aimag(c3(i))**2) + write(13,3001) i,freq,s +3001 format(i6,2f10.3) + enddo + endif enddo 999 end program t1