mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-03 07:51:16 -05:00
c99e8fe358
specjt.py: add code for 2 x waterfall BW sync65.f: allow sync searcy over full BW wsjt65.f: add end-of-line numbers to average message flat2.f: extend spectrum to 5 kHz gcom2.f90: add communication for wide waterfall BW spec.f90: add code for 2 x BW wsjt.py: dummy git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@262 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
29 lines
582 B
Fortran
29 lines
582 B
Fortran
subroutine flat2(ss,n,nsum)
|
|
|
|
real ss(2048)
|
|
real ref(2048)
|
|
real tmp(2048)
|
|
|
|
nsmo=20
|
|
base=50*(float(nsum)**1.5)
|
|
ia=nsmo+1
|
|
ib=n-nsmo-1
|
|
do i=ia,ib
|
|
call pctile(ss(i-nsmo),tmp,2*nsmo+1,50,ref(i))
|
|
enddo
|
|
call pctile(ref(ia),tmp,ib-ia+1,68,base2)
|
|
|
|
C Don't flatten if signal is extremely low (e.g., RX is off).
|
|
if(base2.gt.0.05*base) then
|
|
do i=ia,ib
|
|
ss(i)=base*ss(i)/ref(i)
|
|
enddo
|
|
else
|
|
do i=1,n
|
|
ss(i)=0.
|
|
enddo
|
|
endif
|
|
|
|
return
|
|
end
|