User: reisswig Date: 2012/03/27 08:05 PM
Modified: /trunk/DataAnalysis/ DataAnalysis.py
Log: Um. om.
File Changes:
Directory: /trunk/DataAnalysis/ ===============================
File [modified]: DataAnalysis.py Delta lines: +6 -6 =================================================================== --- trunk/DataAnalysis/DataAnalysis.py 2012-03-28 00:59:56 UTC (rev 12) +++ trunk/DataAnalysis/DataAnalysis.py 2012-03-28 01:05:46 UTC (rev 13) @@ -736,9 +736,9 @@ subDF1, subDF2 = MakeConsistent(DF1, DF2shift, x0, x1, dx) # first, compute DeltaPhi analytically according to Boyle et al. via midpoint rule DeltaPhi = 0 - DeltaPhi += (subDF1.f[0]-subDF2.f[0]) - DeltaPhi += (subDF1.f[-1]-subDF2.f[-1]) - for ii in range (0, subDF1.Length()): + DeltaPhi += 0.5*(subDF1.f[0]-subDF2.f[0]) + DeltaPhi += 0.5*(subDF1.f[-1]-subDF2.f[-1]) + for ii in range (1, subDF1.Length()-1): DeltaPhi += (subDF1.f[ii]-subDF2.f[ii]) DeltaPhi /= (subDF1.Length()-1) # Now compute error @@ -776,9 +776,9 @@ subDF1, subDF2 = MakeConsistent(DF1, DF2shift, x0, x1, dx) # first, compute DeltaPhi analytically according to Boyle et al. DeltaPhi = 0 - DeltaPhi += (subDF1.f[0]-subDF2.f[0]) - DeltaPhi += (subDF1.f[-1]-subDF2.f[-1]) - for ii in range (0, subDF1.Length()): + DeltaPhi += 0.5*(subDF1.f[0]-subDF2.f[0]) + DeltaPhi += 0.5*(subDF1.f[-1]-subDF2.f[-1]) + for ii in range (1, subDF1.Length()-1): DeltaPhi += (subDF1.f[ii]-subDF2.f[ii]) DeltaPhi /= (subDF1.Length()-1) err = 0