mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-03 06:32:26 -04:00
Compute s1() in a separate subroutine, q65_symspec.f90.
This commit is contained in:
parent
0c13a69823
commit
63beab393b
@ -33,7 +33,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
|
|||||||
real, allocatable :: ccf1(:) !CCF(freq) at best lag
|
real, allocatable :: ccf1(:) !CCF(freq) at best lag
|
||||||
real, allocatable :: ccf2(:) !CCF(freq) at any lag
|
real, allocatable :: ccf2(:) !CCF(freq) at any lag
|
||||||
real sync(85) !sync vector
|
real sync(85) !sync vector
|
||||||
complex, allocatable :: c0(:) !Complex spectrum of symbol
|
|
||||||
data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
|
data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
|
||||||
data sync(1)/99.0/
|
data sync(1)/99.0/
|
||||||
save sync
|
save sync
|
||||||
@ -58,7 +57,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
|
|||||||
|
|
||||||
allocate(s1(iz,jz))
|
allocate(s1(iz,jz))
|
||||||
allocate(s3(-64:LL-65,63))
|
allocate(s3(-64:LL-65,63))
|
||||||
allocate(c0(0:nfft-1))
|
|
||||||
allocate(ccf(-ia2:ia2,-53:214))
|
allocate(ccf(-ia2:ia2,-53:214))
|
||||||
allocate(ccf1(-ia2:ia2))
|
allocate(ccf1(-ia2:ia2))
|
||||||
allocate(ccf2(-ia2:ia2))
|
allocate(ccf2(-ia2:ia2))
|
||||||
@ -71,27 +69,8 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('s1 ',0)
|
call timer('s1 ',0)
|
||||||
fac=1/32767.0
|
nmax=ntrperiod*12000
|
||||||
do j=1,jz !Compute symbol spectra at step size
|
call q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1)
|
||||||
i1=(j-1)*istep
|
|
||||||
i2=i1+nsps-1
|
|
||||||
k=-1
|
|
||||||
do i=i1,i2,2 !Load iwave data into complex array c0, for r2c FFT
|
|
||||||
xx=iwave(i)
|
|
||||||
yy=iwave(i+1)
|
|
||||||
k=k+1
|
|
||||||
c0(k)=fac*cmplx(xx,yy)
|
|
||||||
enddo
|
|
||||||
c0(k+1:)=0.
|
|
||||||
call four2a(c0,nfft,1,-1,0) !r2c FFT
|
|
||||||
do i=1,iz
|
|
||||||
s1(i,j)=real(c0(i))**2 + aimag(c0(i))**2
|
|
||||||
enddo
|
|
||||||
! For large Doppler spreads, should we smooth the spectra here?
|
|
||||||
do i=1,nsmo
|
|
||||||
call smo121(s1(1:iz,j),iz)
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
call timer('s1 ',1)
|
call timer('s1 ',1)
|
||||||
|
|
||||||
i0=nint(nfqso/df) !Target QSO frequency
|
i0=nint(nfqso/df) !Target QSO frequency
|
||||||
@ -303,6 +282,41 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
|
|||||||
900 return
|
900 return
|
||||||
end subroutine q65_sync
|
end subroutine q65_sync
|
||||||
|
|
||||||
|
subroutine q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1)
|
||||||
|
|
||||||
|
integer*2 iwave(0:nmax-1) !Raw data
|
||||||
|
real s1(iz,jz)
|
||||||
|
complex, allocatable :: c0(:) !Complex spectrum of symbol
|
||||||
|
|
||||||
|
allocate(c0(0:nsps-1))
|
||||||
|
|
||||||
|
nfft=nsps
|
||||||
|
fac=1/32767.0
|
||||||
|
do j=1,jz !Compute symbol spectra at step size
|
||||||
|
i1=(j-1)*istep
|
||||||
|
i2=i1+nsps-1
|
||||||
|
k=-1
|
||||||
|
do i=i1,i2,2 !Load iwave data into complex array c0, for r2c FFT
|
||||||
|
xx=iwave(i)
|
||||||
|
yy=iwave(i+1)
|
||||||
|
k=k+1
|
||||||
|
c0(k)=fac*cmplx(xx,yy)
|
||||||
|
enddo
|
||||||
|
c0(k+1:)=0.
|
||||||
|
call four2a(c0,nfft,1,-1,0) !r2c FFT
|
||||||
|
do i=1,iz
|
||||||
|
s1(i,j)=real(c0(i))**2 + aimag(c0(i))**2
|
||||||
|
enddo
|
||||||
|
! For large Doppler spreads, should we smooth the spectra here?
|
||||||
|
do i=1,nsmo
|
||||||
|
call smo121(s1(1:iz,j),iz)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
|
return
|
||||||
|
end subroutine q65_symspec
|
||||||
|
|
||||||
|
|
||||||
subroutine q65_dec1(s3,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,decoded)
|
subroutine q65_dec1(s3,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,decoded)
|
||||||
|
|
||||||
use q65
|
use q65
|
||||||
|
Loading…
x
Reference in New Issue
Block a user