mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-30 05:12:26 -04:00
Maintain approximately constant baseline level when degrading S/N for tests.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7158 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
b1d53e1fad
commit
786dc05dce
@ -7,15 +7,10 @@ subroutine degrade_snr(d2,npts,db,bw)
|
|||||||
p0=dot_product(dat(1:npts),dat(1:npts))/npts
|
p0=dot_product(dat(1:npts),dat(1:npts))/npts
|
||||||
if(bw.gt.0.0) p0=p0*6000.0/bw
|
if(bw.gt.0.0) p0=p0*6000.0/bw
|
||||||
s=sqrt(p0*(10.0**(0.1*db) - 1.0))
|
s=sqrt(p0*(10.0**(0.1*db) - 1.0))
|
||||||
|
fac=sqrt(p0/(p0+s*s))
|
||||||
do i=1,npts
|
do i=1,npts
|
||||||
d2(i)=nint(dat(i) + s*gran())
|
d2(i)=nint(fac*(dat(i) + s*gran()))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! dat(1:npts)=d2
|
|
||||||
! p1=dot_product(dat(1:npts),dat(1:npts))/npts
|
|
||||||
! if(bw.gt.0.0) p1=p1*6000.0/bw
|
|
||||||
! write(*,3001) db,bw,p0,s,10.0*log10(p1/p0)
|
|
||||||
!3001 format(5f10.3)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine degrade_snr
|
end subroutine degrade_snr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user