From 883c914d29693bca8c269339df2c6823187fb700 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Fri, 24 May 2019 20:09:00 -0500 Subject: [PATCH] Make DT=0 mean that the first full symbol starts at t=0.5s. Formerly DT=0 corresponded to the beginning of the ramp-up symbol. Fix a bug that caused signals with large DT to wrap around instead of truncating them. --- lib/ft4/ft4sim.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ft4/ft4sim.f90 b/lib/ft4/ft4sim.f90 index e35e5ad8a..959cf423c 100644 --- a/lib/ft4/ft4sim.f90 +++ b/lib/ft4/ft4sim.f90 @@ -110,8 +110,10 @@ program ft4sim c0((NN+1)*NSPS:(NN+2)*NSPS-1)=c0((NN+1)*NSPS:(NN+2)*NSPS-1)*(1.0+cos(twopi*(/(i,i=0,NSPS-1)/)/(2.0*NSPS) ))/2.0 c0((NN+2)*NSPS:)=0. - k=nint((xdt+0.5)/dt) + k=nint((xdt+0.5)/dt)-NSPS c0=cshift(c0,-k) + if(k.gt.0) c0(0:k-1)=0.0 + if(k.lt.0) c0(NZZ+k:NZZ-1)=0.0 do ifile=1,nfiles c=c0