From 5b9c71f3803d8652e7e03d598335a91f86cd98ee Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 12 Dec 2019 20:56:02 -0500 Subject: [PATCH] Proper SNR calculations for each mode speed under additive gaussian white noise --- lib/js8/js8dec.f90 | 2 +- lib/js8a_decode.f90 | 1 - lib/js8b_decode.f90 | 3 +-- lib/js8c_decode.f90 | 3 +-- lib/js8e_decode.f90 | 3 +-- lib/js8i_decode.f90 | 3 +-- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/js8/js8dec.f90 b/lib/js8/js8dec.f90 index 57627e5..e56adc7 100644 --- a/lib/js8/js8dec.f90 +++ b/lib/js8/js8dec.f90 @@ -476,7 +476,7 @@ subroutine js8dec(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0 xsnr=10.0*log10(xsnr)-27.0 xsnr2=db(xsig/xbase - 1.0) - 32.0 - if(.not.nagain) xsnr=min(xsnr, xsnr2) + if(.not.nagain) xsnr=xsnr2 if(xsnr .lt. -28.0) xsnr=-28.0 msg37=origmsg//' ' diff --git a/lib/js8a_decode.f90 b/lib/js8a_decode.f90 index 252d7ed..ffc6405 100644 --- a/lib/js8a_decode.f90 +++ b/lib/js8a_decode.f90 @@ -101,7 +101,6 @@ contains f1=candidate(1,icand) xdt=candidate(2,icand) xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz - nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### if(NWRITELOG.eq.1) then write(*,*) ' candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase diff --git a/lib/js8b_decode.f90 b/lib/js8b_decode.f90 index 31d80e6..77d414b 100644 --- a/lib/js8b_decode.f90 +++ b/lib/js8b_decode.f90 @@ -100,8 +100,7 @@ contains sync=candidate(3,icand) f1=candidate(1,icand) xdt=candidate(2,icand) - xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz - nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### + xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-39.0)) ! 3.125Hz if(NWRITELOG.eq.1) then write(*,*) ' candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase diff --git a/lib/js8c_decode.f90 b/lib/js8c_decode.f90 index ba62e33..27b873b 100644 --- a/lib/js8c_decode.f90 +++ b/lib/js8c_decode.f90 @@ -100,8 +100,7 @@ contains sync=candidate(3,icand) f1=candidate(1,icand) xdt=candidate(2,icand) - xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz - nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### + xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-38.0)) ! 3.125Hz if(NWRITELOG.eq.1) then write(*,*) ' candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase diff --git a/lib/js8e_decode.f90 b/lib/js8e_decode.f90 index 32aac14..16c6189 100644 --- a/lib/js8e_decode.f90 +++ b/lib/js8e_decode.f90 @@ -100,8 +100,7 @@ contains sync=candidate(3,icand) f1=candidate(1,icand) xdt=candidate(2,icand) - xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz - nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### + xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-42.0)) ! 3.125Hz if(NWRITELOG.eq.1) then write(*,*) ' candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase diff --git a/lib/js8i_decode.f90 b/lib/js8i_decode.f90 index e176929..5a49265 100644 --- a/lib/js8i_decode.f90 +++ b/lib/js8i_decode.f90 @@ -100,8 +100,7 @@ contains sync=candidate(3,icand) f1=candidate(1,icand) xdt=candidate(2,icand) - xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz - nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### + xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-36.0)) ! 3.125Hz if(NWRITELOG.eq.1) then write(*,*) ' candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase