Temporary: has some diagnostic writes ...

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7489 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-01-13 19:13:40 +00:00
parent e013029f3b
commit e24a5fb06b
4 changed files with 53 additions and 34 deletions

View File

@ -190,7 +190,10 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
if(nqd.eq.1 .and. ntol.le.100) thresh1=0. if(nqd.eq.1 .and. ntol.le.100) thresh1=0.
noffset=0 noffset=0
if(nqd.ge.1) noffset=nint(1000.0*(freq-fqso)-mousedf) if(nqd.ge.1) noffset=nint(1000.0*(freq-fqso)-mousedf)
if(nqd.eq.2) sync1=thresh1+1.0 if(nqd.eq.2) then
sync1=thresh1+1.0
noffset=0
endif
if(sync1.gt.thresh1 .and. abs(noffset).le.ntol) then if(sync1.gt.thresh1 .and. abs(noffset).le.ntol) then
! Keep only the best candidate within ftol. ! Keep only the best candidate within ftol.
! (Am I deleting any good decodes by doing this?) ! (Am I deleting any good decodes by doing this?)

View File

@ -1,4 +1,4 @@
subroutine qra64b(nutc,nqd,ikhz,idf,ntol,xpol,mycall_12,hiscall_12, & subroutine qra64b(nutc,nqd,ikhz,mousedf,ntol,xpol,mycall_12,hiscall_12, &
hisgrid_6) hisgrid_6)
parameter (NFFT1=5376000) !56*96000 parameter (NFFT1=5376000) !56*96000
@ -11,7 +11,7 @@ subroutine qra64b(nutc,nqd,ikhz,idf,ntol,xpol,mycall_12,hiscall_12, &
common/cacb/ca,cb common/cacb/ca,cb
df=96000.0/NFFT1 df=96000.0/NFFT1
k0=(ikhz-75.7)*1000.0/df k0=(ikhz-75.74)*1000.0/df
nh=nfft2/2 nh=nfft2/2
fac=1.0/NFFT2 fac=1.0/NFFT2
cx(0:nh)=ca(k0:k0+nh) cx(0:nh)=ca(k0:k0+nh)
@ -26,7 +26,7 @@ subroutine qra64b(nutc,nqd,ikhz,idf,ntol,xpol,mycall_12,hiscall_12, &
call four2a(cy,NFFT2,1,-1,1) call four2a(cy,NFFT2,1,-1,1)
! write(67) nutc,cx,cy ! write(67) nutc,cx,cy
call qra64c(cx,cy,nutc,nqd,ikhz,idf,ntol,xplo,mycall_12, & call qra64c(cx,cy,nutc,nqd,ikhz,mousedf,ntol,xplo,mycall_12, &
hiscall_12,hisgrid_6) hiscall_12,hisgrid_6)
return return

View File

@ -29,10 +29,8 @@ subroutine qra64c(cx,cy,nutc,nqd,ikhz,nfqso,ntol,xpol,mycall_12, &
save save
! For now: ! For now:
nf1=200 nf1=-3000
nf2=2200 nf2=3000
! nfqso=808
! ntol=1000
mode64=1 mode64=1
minsync=-1 minsync=-1
ndepth=3 ndepth=3
@ -71,8 +69,10 @@ subroutine qra64c(cx,cy,nutc,nqd,ikhz,nfqso,ntol,xpol,mycall_12, &
naptype=maxaptype naptype=maxaptype
npts2=NFFT2 npts2=NFFT2
!1 read(67,end=999) nutc,cx,cy !###
c00(0:NFFT2-1)=conjg(cy) c00(0:NFFT2-1)=conjg(cy)
!###
call sync64(c00,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk0,sync, & call sync64(c00,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk0,sync, &
sync2,width) sync2,width)
@ -161,18 +161,16 @@ subroutine qra64c(cx,cy,nutc,nqd,ikhz,nfqso,ntol,xpol,mycall_12, &
! write(*,1011) nutc/100,nsnr,dtx,nfreq,decoded ! write(*,1011) nutc/100,nsnr,dtx,nfreq,decoded
!1011 format(i4.4,i4,f5.1,i5,1x,2x,1x,a22) !1011 format(i4.4,i4,f5.1,i5,1x,2x,1x,a22)
nkhz=108
npol=0 npol=0
cp='H' cp='H'
nsync=sync
ntxpol=0 ntxpol=0
if(irc.ge.0) then if(irc.ge.0) then
write(*,1010) nkHz,nfreq,npol,nutc/100,dtx,nsnr,decoded,irc,ntxpol,cp write(*,1010) ikHz,nfreq,npol,nutc/100,dtx,nsnr,decoded,irc,ntxpol,cp
!1010 format('!',i3,i5,i4,i7.6,f5.1,i4,2x,a22,i2,i5,i5,1x,a1) !1010 format('!',i3,i5,i4,i7.6,f5.1,i4,2x,a22,i2,i5,i5,1x,a1)
!1010 format(i3,i5,i4,i5.4,f5.1,i5,2x,a22,i2,i5,1x,a1) !1010 format(i3,i5,i4,i5.4,f5.1,i5,2x,a22,i2,i5,1x,a1)
1010 format('!',i3,i5,i4,i6.4,f5.1,i5,2x,a22,i2,i5,1x,a1) 1010 format('!',i3,i5,i4,i6.4,f5.1,i5,2x,a22,i2,i5,1x,a1)
else else
write(*,1010) nkHz,nfreq,npol,nutc/100,dtx,nsync write(*,1010) ikHz,nfreq,npol,nutc/100,dtx,nsnr
endif endif
! goto 1 ! goto 1

View File

@ -45,16 +45,22 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk,sync, &
nh3=nfft3/2 nh3=nfft3/2
df3=6000.0/nfft3 df3=6000.0/nfft3
fa=max(nf1,nfqso-ntol) ! fa=max(nf1,nfqso-ntol)
fb=min(nf2,nfqso+ntol) ! fb=min(nf2,nfqso+ntol)
iaa=max(0,nint(fa/df3)) fa=nfqso-ntol
ibb=min(NSPC-1,nint(fb/df3)) fb=nfqso+ntol
iaa=max(0,nint(fa/df3)+nh3)
ibb=min(NSPC-1,nint(fb/df3)+nh3)
write(74,3401) nf1,nf2,nfqso,ntol,iaa,ibb,fa,fb
3401 format(6i6,2f8.1)
flush(74)
maxtol=max(ntol,500) maxtol=max(ntol,500)
fa=max(nf1,nfqso-maxtol) fa=max(nf1,nfqso-maxtol)
fb=min(nf2,nfqso+maxtol) fb=min(nf2,nfqso+maxtol)
ia=max(0,nint(fa/df3)) ia=max(0,nint(fa/df3)+nh3)
ib=min(NSPC-1,nint(fb/df3)) ib=min(NSPC-1,nint(fb/df3)+nh3)
id=0.1*(ib-ia) id=0.1*(ib-ia)
iz=ib-ia+1 iz=ib-ia+1
sync=-1.e30 sync=-1.e30
@ -79,6 +85,9 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk,sync, &
call four2a(c1,nfft3,1,-1,1) call four2a(c1,nfft3,1,-1,1)
call four2a(c2,nfft3,1,-1,1) call four2a(c2,nfft3,1,-1,1)
call four2a(c3,nfft3,1,-1,1) call four2a(c3,nfft3,1,-1,1)
c1=cshift(c1,nh3)
c2=cshift(c2,nh3)
c3=cshift(c3,nh3)
s1=0. s1=0.
s2=0. s2=0.
s3=0. s3=0.
@ -111,14 +120,14 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk,sync, &
sync=s sync=s
dtx=jpk/6000.0 - 1.0 dtx=jpk/6000.0 - 1.0
ipk=ip ipk=ip
f0=ip*df3 f0=ip*df3 - 3000.0
endif endif
call timer('sync64_2',1) call timer('sync64_2',1)
enddo enddo
s0a=s0a+2.0 s0a=s0a+2.0
write(17) ia,ib,s0a(ia:ib) !Save data for red curve ! write(17) ia,ib,s0a(ia:ib) !Save data for red curve
close(17) ! close(17)
nskip=50 nskip=50
call lorentzian(s0a(ia+nskip:ib-nskip),iz-2*nskip,a) call lorentzian(s0a(ia+nskip:ib-nskip),iz-2*nskip,a)
@ -137,18 +146,27 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,emedelay,dtx,f0,jpk,sync, &
rms2=sqrt(sq/40.0) rms2=sqrt(sq/40.0)
sync2=10.0*log10(a(2)/rms2) sync2=10.0*log10(a(2)/rms2)
! do i=1,iz-2*nskip rewind 76
! x=i do i=1,iz-2*nskip
! z=(x-a(3))/(0.5*a(4)) x=i
! yfit=a(1) z=(x-a(3))/(0.5*a(4))
! if(abs(z).lt.3.0) then yfit=a(1)
! d=1.0 + z*z if(abs(z).lt.3.0) then
! yfit=a(1) + a(2)*(1.0/d - 0.1) d=1.0 + z*z
! endif yfit=a(1) + a(2)*(1.0/d - 0.1)
! j=i+ia+49 endif
! write(76,1110) j*df3,s0a(j),yfit j=i+ia+49
!1110 format(3f10.3) write(76,1110) j*df3-3000.0,s0a(j),yfit
! enddo 1110 format(3f10.3)
enddo
flush(76)
!###
write(75,3301) ntol,maxtol,nfqso,fa,fb,iaa*df3,ibb*df3,dtx,f0,sync
3301 format(3i6,7f8.1)
flush(75)
!###
return return
end subroutine sync64 end subroutine sync64