Merge branch 'develop' into feat-refactor

This commit is contained in:
Bill Somerville 2019-07-04 12:34:20 +01:00
commit 60332e799e
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
3 changed files with 1 additions and 71 deletions

View File

@ -391,7 +391,6 @@ set (wsjt_FSRCS
lib/astro0.f90 lib/astro0.f90
lib/avecho.f90 lib/avecho.f90
lib/averms.f90 lib/averms.f90
lib/ft4/averaged_mf.f90
lib/azdist.f90 lib/azdist.f90
lib/badmsg.f90 lib/badmsg.f90
lib/ft8/baseline.f90 lib/ft8/baseline.f90
@ -1319,9 +1318,6 @@ target_link_libraries (msk144sim wsjt_fort wsjt_cxx)
add_executable (ft4sim lib/ft4/ft4sim.f90 wsjtx.rc) add_executable (ft4sim lib/ft4/ft4sim.f90 wsjtx.rc)
target_link_libraries (ft4sim wsjt_fort wsjt_cxx) target_link_libraries (ft4sim wsjt_fort wsjt_cxx)
add_executable (averaged_mf lib/ft4/averaged_mf.f90 wsjtx.rc)
target_link_libraries (averaged_mf wsjt_fort wsjt_cxx)
add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc) add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc)
target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx)

View File

@ -1,64 +0,0 @@
program averaged_mf
parameter (nsps=32)
complex cgfsk(3*nsps,64)
complex clin(3*nsps,64)
complex cavg(3*nsps,4)
complex cavl(3*nsps,4)
real pulse(3*nsps)
real dphi(3*nsps)
do i=1,3*NSPS
t=(i-1.5*nsps)/real(nsps)
pulse(i)=gfsk_pulse(1.0,t)
enddo
twopi=8.0*atan(1.0)
hmod=1.0
dphi_peak=twopi*hmod/real(nsps)
do iwf=1,64
i0=mod((iwf-1)/16,4)
i1=mod((iwf-1)/4,4)
i2=mod(iwf-1,4)
dphi=0.0
dphi(1:64)=dphi_peak*pulse(33:96)*i1
dphi(1:96)=dphi(1:96)+dphi_peak*pulse(1:96)*i0
dphi(33:96)=dphi(33:96)+dphi_peak*pulse(1:64)*i2
phi=0.0
do j=1,96
cgfsk(j,iwf)=cmplx(cos(phi),sin(phi))
phi=mod(phi+dphi(j),twopi)
enddo
cgfsk(:,iwf)=cgfsk(:,iwf)*conjg(cgfsk(48,iwf))
enddo
do iwf=1,64
i0=mod((iwf-1)/16,4)
i1=mod((iwf-1)/4,4)
i2=mod(iwf-1,4)
dphi=0.0
dphi(1:32)=dphi_peak*i1
dphi(33:64)=dphi_peak*i0
dphi(65:96)=dphi_peak*i2
phi=0.0
do j=1,96
clin(j,iwf)=cmplx(cos(phi),sin(phi))
phi=mod(phi+dphi(j),twopi)
enddo
enddo
do i=1,4
ib=(i-1)*16+1
ie=ib+15
cavg(:,i)=sum(cgfsk(:,ib:ie),2)/16.0
cavl(:,i)=sum(clin(:,ib:ie),2)/16.0
do j=1,96
write(*,*) j
write(21,*) i,j,real(cavg(j,i)),imag(cavg(j,i)),real(cavl(j,i)),imag(cavl(j,i))
enddo
enddo
end program averaged_mf

View File

@ -32,9 +32,7 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, &
if(ib.gt.NMAX) exit if(ib.gt.NMAX) exit
x=fac*dd(ia:ib)*window x=fac*dd(ia:ib)*window
call four2a(x,NFFT1,1,-1,0) !r2c FFT call four2a(x,NFFT1,1,-1,0) !r2c FFT
do i=1,NH1 s(1:NH1,j)=abs(cx(1:NH1))**2
s(i,j)=real(cx(i))**2 + aimag(cx(i))**2
enddo
savg=savg + s(1:NH1,j) !Average spectrum savg=savg + s(1:NH1,j) !Average spectrum
enddo enddo
savg=savg/NHSYM savg=savg/NHSYM