Add a disabled option to print the reference waveform to fort.51.

This commit is contained in:
Steven Franke 2020-07-13 14:58:50 -05:00
parent bac3cc7471
commit db3e0d8022
2 changed files with 21 additions and 6 deletions

View File

@ -87,11 +87,5 @@ subroutine gen_fst240wave(itone,nsym,nsps,nwave,fsample,hmod,f0, &
cwave=cshift(cwave,kshift)
endif
! do i=1,nwave
! write(71,3071) i,i/48000.0,wave(i)
!3071 format(i10,2f15.9)
! enddo
wave(nsps*nsym:)=0. !Kill a stray spike ??
return
end subroutine gen_fst240wave

View File

@ -547,6 +547,10 @@ contains
else
call get_fst240_tones_from_bits(message74,itone,1)
endif
if(.false.) then
call write_ref(itone,iwave,nsps,nmax,ndown,hmod, &
isbest,fc_synced)
endif
xsig=0
do i=1,NN
xsig=xsig+s4(itone(i),i)**2
@ -802,4 +806,21 @@ contains
return
end subroutine get_candidates_fst240
subroutine write_ref(itone,iwave,nsps,nmax,ndown,hmod,i0,fc)
complex cwave(nmax)
integer itone(160)
integer*2 iwave(nmax)
integer hmod
wave=0
fsample=12000.0
nsym=160
call gen_fst240wave(itone,nsym,nsps,nmax,fsample,hmod,fc, &
1,cwave,wave)
cwave=cshift(cwave,-i0*ndown)
do i=1,nmax
write(51,*) i,iwave(i),real(cwave(i)),imag(cwave(i))
enddo
end subroutine subtract240
end module fst240_decode