Some cleanup of source-code comments.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2967 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-01-22 20:14:35 +00:00
parent 5b51d6be83
commit a3ea290673
3 changed files with 14 additions and 29 deletions

View File

@ -27,22 +27,17 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
df=0.5*11025.0/nfft
psavg(1:nh)=0.
! Compute power spectrum for each step and get average
do j=1,nsteps
do j=1,nsteps !Compute spectrum for each step, get average
k=(j-1)*nq + 1
! call limit(dat(k),nfft)
call ps24(dat(k),nfft,s2(1,j))
! if(mode65.eq.4) call smooth(s2(1,j),nh)
psavg(1:nh)=psavg(1:nh) + s2(1:nh,j)
enddo
call flat1(psavg,s2,nh,nsteps,NHMAX,NSMAX) !Flatten the spectra
! Find the best frequency channel for CCF
! famin= 670.46
! fbmax=1870.46
call flat1(psavg,s2,nh,nsteps,NHMAX,NSMAX) !Flatten spectra
! Set freq and lag ranges
famin=200.
fbmax=2700.
fa=famin
fb=fbmax
if(NFreeze.eq.1) then
@ -63,20 +58,21 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
lag2=59
syncbest=-1.e30
syncbest2=-1.e30
ccfred=0.
do i=ia,ib
do i=ia,ib !Find best frequency channel for CCF
call xcor24(s2,i,nsteps,nsym,lag1,lag2,mode4,ccfblue,ccf0,lagpk0,flip)
j=i-i0
if(mode.eq.7) j=j + 3*mode4
if(j.ge.-372 .and. j.le.372) ccfred(j)=ccf0
! Find rms of the CCF, without the main peak
! Find rms of the CCF, without main peak
call slope(ccfblue(lag1),lag2-lag1+1,lagpk0-lag1+1.0)
sync=abs(ccfblue(lagpk0))
ppmax=psavg(i)-1.0
! Find the best sync value
! Find best sync value
if(sync.gt.syncbest2) then
ipk2=i
lagpk2=lagpk0
@ -100,12 +96,7 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
syncbest=syncbest2
endif
! Peak up in frequency to fraction of channel
! call peakup(psavg(ipk-1),psavg(ipk),psavg(ipk+1),dx)
! if(dx.lt.-1.0) dx=-1.0
! if(dx.gt.1.0) dx=1.0
dx=0.
dfx=(ipk+dx-i0)*df
dfx=(ipk-i0)*df
if(mode.eq.7) dfx=dfx + 3*mode4*df
! Peak up in time, at best whole-channel frequency
@ -127,14 +118,13 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
endif
enddo
rms=sqrt(sq/nsq)
snrsync=abs(ccfblue(lagpk))/rms - 1.1 !Empirical
snrsync=abs(ccfblue(lagpk))/rms - 1.1 !Empirical
dt=2.0/11025.0
istart=xlag*nq
dtx=istart*dt
snrx=-99.0
! ppmax=psavg(ipk)-1.0
if(ipk.ge.1 .and. ipk.le.1260) ppmax=psavg(ipk)-1.0 !###
ppmax=psavg(ipk)-1.0
if(ppmax.gt.0.0001) then
snrx=db(ppmax*df/2500.0) + 7.5 !Empirical
@ -143,12 +133,8 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
if(snrx.lt.-33.0) snrx=-33.0
! Compute width of sync tone to outermost -3 dB points
! call pctile(ccfred(ia-i0),tmp,ib-ia+1,45,base)
! i1=max(-224,ia-i0)
! i2=min(224,ib-i0)
i1=max(-450,ia-i0)
i2=min(450,ib-i0)
!### call pctile(ccfred(i1),tmp,i2-i1+1,45,base)
call pctile(ccfred(i1),i2-i1+1,45,base)
jpk=ipk-i0
@ -169,7 +155,6 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
if(abs(jpk+i-1).gt.450 .or. abs(jpk+i).gt.450) then
print*,'sync24 b:',jpk,i
else
! x1=i-1+(stest-ccfred(jpk+i-1))/(ccfred(jpk+i)-ccfred(jpk+i-1))
x1=i-0.5
endif
@ -179,7 +164,6 @@ subroutine sync24(dat,jz,DFTolerance,NFreeze,MouseDF,mode,mode4, &
endif
enddo
i=0
! 32 x2=i+1-(stest-ccfred(jpk+i+1))/(ccfred(jpk+i)-ccfred(jpk+i+1))
32 x2=i+0.5
width=x2-x1
if(width.gt.1.2) width=sqrt(width**2 - 1.44)

View File

@ -27,6 +27,7 @@ program wsjt24d
! write(*,3000) ifile,cfile6,jz,mode,mode4,idf
!3000 format(i3,2x,a6,i10,3i5)
! call wsjt24(dat(4097),jz-4096,cfile6,NClearAve,MinSigdB,DFTolerance, &
call wsjt24(dat,jz,cfile6,NClearAve,MinSigdB,DFTolerance, &
NFreeze,mode,mode4,Nseg,MouseDF2,NAgain,idf,lumsg,lcum,nspecial, &
ndf,NSyncOK,ccfblue,ccfred,ndiag)

View File

@ -1,4 +1,4 @@
//---------------------------------------------------------------- MainWindow
//--------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "devsetup.h"