From 089e0b9ebe700902986847bbd569cf4611d60f98 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 19 Oct 2021 10:01:47 -0400 Subject: [PATCH] Protect against NaN in savg() after switch from Q65 to JT65 mode. --- lib/jt65_decode.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jt65_decode.f90 b/lib/jt65_decode.f90 index 8ac539e94..4e73ee7b1 100644 --- a/lib/jt65_decode.f90 +++ b/lib/jt65_decode.f90 @@ -162,6 +162,7 @@ contains ib=min(NSZ,nint((nfb+100)/df)) nz=ib-ia+1 if(nz.lt.50) go to 900 + if(isnan(sum(savg(ia:ia+nz-1)))) go to 900 call lorentzian(savg(ia),nz,a) baseline=a(1) amp=a(2)