From 1a9c6b3b6ff09e1de1d6f9810c16d35263b0998d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 18 Apr 2016 14:15:09 +0000 Subject: [PATCH] Correct a problem with flagging supposedly bad data when reference spectrum is used. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6624 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/baddata.f90 | 6 ++++-- lib/decoder.f90 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/baddata.f90 b/lib/baddata.f90 index edacc1d57..378de8d6d 100644 --- a/lib/baddata.f90 +++ b/lib/baddata.f90 @@ -15,8 +15,10 @@ logical function baddata(id2,nz) sq=sq + x*x enddo rms=sqrt(sq/nadd) - smin=min(smin,rms) - smax=max(smax,rms) + if(i.gt.6) then + smin=min(smin,rms) + smax=max(smax,rms) + endif enddo sratio=smax/(smin+1.e-30) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 044679697..9a0213aef 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -36,7 +36,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) if(mod(params%nranera,2).eq.1) ntrials=3*10**(params%nranera/2) if(params%nranera.eq.0) ntrials=0 - rms=sqrt(dot_product(float(id2(300000:310000)), & + rms=sqrt(dot_product(float(id2(300000:310000)), & float(id2(300000:310000)))/10000.0) if(rms.lt.2.0) go to 800