These are the files from QRA64 "ee" test.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7368 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-12-08 13:15:44 +00:00
parent 93f7393da7
commit b47b4b077b
5 changed files with 77 additions and 83 deletions

View File

@ -1,19 +1,6 @@
# Set paths
EXE_DIR = ..\\..\\wsjtx_install
QT_DIR = C:/wsjt-env/Qt5/5.2.1/mingw48_32
FFTW3_DIR = ..
INCPATH = -I${QT_DIR}/include/QtCore -I${QT_DIR}/include
# Compilers
CC = gcc CC = gcc
CXX = g++ CXX = g++
FC = gfortran FC = gfortran
AR = ar cr
RANLIB = ranlib
MKDIR = mkdir -p
CP = cp
RM = rm -f
FFLAGS = -O2 -fbounds-check -Wall -Wno-conversion FFLAGS = -O2 -fbounds-check -Wall -Wno-conversion
CFLAGS = -O2 -I. CFLAGS = -O2 -I.

View File

@ -99,6 +99,12 @@ contains
if(nsubmode.ge.100) then if(nsubmode.ge.100) then
! This is QRA64 mode ! This is QRA64 mode
mode64=2**(nsubmode-100) mode64=2**(nsubmode-100)
!###
! open(60,file='qra64_data.bin',access='stream',position='append')
! write(60) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
! mycall,hiscall,hisgrid
! close(60)
!###
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, & call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft) mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
if (associated(this%callback)) then if (associated(this%callback)) then

View File

@ -61,26 +61,28 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
call timer('sync64 ',0) call timer('sync64 ',0)
call sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk0,kpk,sync,c00) call sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk0,kpk,sync,c00)
call timer('sync64 ',1) call timer('sync64 ',1)
if(sync.lt.3.4) go to 900
a=0.
a(1)=-f0
nfreq=nint(f0)
npts2=npts/2
call twkfreq(c00,c0,npts2,6000.0,a)
irc=-99 irc=-99
s3lim=20. s3lim=20.
npts2=npts/2
itz=11 itz=11
if(mode64.eq.4) itz=9 if(mode64.eq.4) itz=9
if(mode64.eq.2) itz=7 if(mode64.eq.2) itz=7
if(mode64.eq.1) itz=5 if(mode64.eq.1) itz=5
LL=64*(mode64+2) LL=64*(mode64+2)
NN=63 NN=63
napmin=99 napmin=99
do itry0=1,7 do itry0=1,5
idt=itry0/2 idt=itry0/2
if(mod(itry0,2).eq.0) idt=-idt if(mod(itry0,2).eq.0) idt=-idt
jpk=jpk0 + 1500*idt jpk=jpk0 + 750*idt
a=0.
a(1)=-f0
nfreq=nint(f0)
call twkfreq(c00,c0,npts2,6000.0,a)
call spec64(c0,npts2,mode64,jpk,s3a,LL,NN) call spec64(c0,npts2,mode64,jpk,s3a,LL,NN)
call pctile(s3a,LL*NN,45,base) call pctile(s3a,LL*NN,45,base)
s3a=s3a/base s3a=s3a/base
@ -136,10 +138,6 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
snr2=0. snr2=0.
endif endif
write(60,3100) nutc,nsnr,dtx,f0,sync,itry0,iter,irc,decoded
3100 format(i4.4,i4,f6.2,2f7.1,3i4,2x,a22)
flush(60)
if(irc.lt.0) then if(irc.lt.0) then
sy=max(1.0,sync-2.5) sy=max(1.0,sync-2.5)
if(nSubmode.eq.0) nsnr=nint(10.0*log10(sy)-38.0) !A if(nSubmode.eq.0) nsnr=nint(10.0*log10(sy)-38.0) !A

View File

@ -2,32 +2,41 @@ program qratest
parameter (NMAX=60*12000) parameter (NMAX=60*12000)
real dd(NMAX) real dd(NMAX)
character*8 arg character arg*8,mycall*12,hiscall*12,hisgrid*6,decoded*22
character*12 mycall,hiscall character c*1,label*3
character*6 hisgrid
character*22 decoded
nargs=iargc() nargs=iargc()
if(nargs.ne.3) then if(nargs.lt.1 .or. nargs.gt.3) then
print*,'Usage: qratest f0 maxf1 fTol' print*,'Usage: qratest nfile [f0 fTol]'
go to 999 go to 999
endif endif
call getarg(1,arg) call getarg(1,arg)
read(arg,*) nf0 read(arg,*) nfile
call getarg(2,arg) if(nargs.gt.1) then
read(arg,*) maxf1 call getarg(2,arg)
call getarg(3,arg) read(arg,*) maxf1
read(arg,*) ntol call getarg(3,arg)
read(arg,*) ntol
endif
ndepth=3 ndepth=3
nft=99
open(60,file='qra64_data.bin',access='stream')
! do n=1,999 do ifile=1,999
do n=1,1 read(60,end=999) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
read(60,end=999) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall, & mycall,hiscall,hisgrid
hiscall,hisgrid if(ifile.lt.nfile) cycle
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, & call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft) mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
write(*,1000) nutc,nsnr,dtx,nfreq,decoded,nft-100 c='a'
1000 format(i4.4,i4,f6.2,i5,1x,a22,i3) if(mode64.eq.2) c='b'
if(mode64.eq.4) c='c'
if(mode64.eq.8) c='d'
if(mode64.eq.16) c='e'
write(*,1000) ifile,c,nutc,nsnr,dtx,nfreq,decoded,nft-100
1000 format(i4,1x,a1,1x,i4.4,i4,f6.2,i5,1x,a22,i3)
if(ifile.eq.nfile) exit
enddo enddo
999 end program qratest 999 end program qratest

View File

@ -27,15 +27,12 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
save save
if(mode64.ne.mode64z) then if(mode64.ne.mode64z) then
nsync=10
inquire(file='old_qra_sync',exist=old_qra_sync)
if(old_qra_sync) nsync=1
twopi=8.0*atan(1.0) twopi=8.0*atan(1.0)
dfgen=mode64*12000.0/6912.0 dfgen=mode64*12000.0/6912.0
k=-1 k=-1
phi=0. phi=0.
do j=0,6 !Compute complex Costas waveform do j=0,6 !Compute complex Costas waveform
dphi=twopi*nsync*icos7(j)*dfgen/6000.0 dphi=twopi*10.0*icos7(j)*dfgen/6000.0
do i=1,NSPS do i=1,NSPS
phi=phi + dphi phi=phi + dphi
if(phi.gt.twopi) phi=phi-twopi if(phi.gt.twopi) phi=phi-twopi
@ -61,15 +58,17 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
nh3=nfft3/2 nh3=nfft3/2
df3=6000.0/nfft3 df3=6000.0/nfft3
faa=max(nf1,nfqso-ntol) fa=max(nf1,nfqso-ntol)
fbb=min(nf2,nfqso+ntol) fb=min(nf2,nfqso+ntol)
iaa=nint(faa/df3) iaa=max(0,nint(fa/df3))
ibb=nint(fbb/df3) ibb=min(NSPC-1,nint(fb/df3))
fa=max(nf1,nfqso-1000) maxtol=max(ntol,500)
fb=min(nf2,nfqso+1000) fa=max(nf1,nfqso-maxtol)
ia=nint(fa/df3) fb=min(nf2,nfqso+maxtol)
ib=nint(fb/df3) ia=max(0,nint(fa/df3))
ib=min(NSPC-1,nint(fb/df3))
id=0.1*(ib-ia)
iz=ib-ia+1 iz=ib-ia+1
sync=0. sync=0.
@ -77,10 +76,13 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
jpk=0 jpk=0
ja=0 ja=0
jb=7.5*6000 jb=7.5*6000
jstep=200 jstep=100
ipk=0 ipk=0
nskip=max(14,10*mode64) kpk=0
nadd=10*mode64
if(mod(nadd,2).eq.0) nadd=nadd+1 !Make nadd odd
nskip=max(49,nadd)
do j1=ja,jb,jstep do j1=ja,jb,jstep
call timer('sync64_1',0) call timer('sync64_1',0)
j2=j1 + 39*NSPS j2=j1 + 39*NSPS
@ -91,7 +93,6 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
call four2a(c2,nfft3,1,-1,1) call four2a(c2,nfft3,1,-1,1)
c3=1.e-4*c0(j3:j3+NSPC-1) * conjg(cc) c3=1.e-4*c0(j3:j3+NSPC-1) * conjg(cc)
call four2a(c3,nfft3,1,-1,1) call four2a(c3,nfft3,1,-1,1)
s0=0.
s1=0. s1=0.
s2=0. s2=0.
s3=0. s3=0.
@ -106,33 +107,26 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
call timer('sync64_2',0) call timer('sync64_2',0)
s0(ia:ib)=s1(ia:ib) + s2(ia:ib) + s3(ia:ib) s0(ia:ib)=s1(ia:ib) + s2(ia:ib) + s3(ia:ib)
call pctile(s0(ia:ib),iz,45,ave)
s0(:ia-1)=0. s0(:ia-1)=0.
s0(ib+1:)=0. s0(ib+1:)=0.
smax=0. if(nadd.ge.3) then
do na=0,3 do ii=1,3
nadd=7*(2**na) s0b(ia:ib)=s0(ia:ib)
if(nadd.gt.161) nadd=161 call smo(s0b(ia:ib),iz,s0(ia:ib),nadd)
if(mod(nadd,2).eq.0) nadd=nadd+1 enddo
call smo(s0(ia:ib)/nadd,iz,s0b(ia:ib),nadd) endif
call smo(s0b(ia:ib)/nadd,iz,s0(ia:ib),nadd) call averms(s0(ia+id:ib-id),iz-2*id,nskip,ave,rms)
rms=ave/sqrt(float(nadd)) s=(maxval(s0(ia:ib))-ave)/rms
s=0. ipk0=maxloc(s0(ia:ib))
sall=0. ip=ipk0(1) + ia - 1
if(rms.gt.0.0) then if(s.gt.sync .and. ip.ge.iaa .and. ip.le.ibb) then
s=(maxval(s0(iaa:ibb))-ave)/rms jpk=j1
sall=(maxval(s0(ia:ib))-ave)/rms s0a=(s0-ave)/rms
endif sync=s
if(sall.gt.smaxall) then dtx=jpk/6000.0 - 1.0
smaxall=sall ipk=ip
s0a=(s0-ave)/rms f0=ip*df3
endif endif
if(s.gt.smax) then
smax=s
nabest=na
s0c(ia:ib)=s0(ia:ib)
endif
enddo
s0=s0c s0=s0c
ipk0=maxloc(s0(ia:ib)) ipk0=maxloc(s0(ia:ib))
ip=ipk0(1) + ia - 1 ip=ipk0(1) + ia - 1