[Commits] [svn:einsteintoolkit] pyGWAnalysis/trunk/DataAnalysis/ (Rev. 9)
reisswig at tapir.caltech.edu
reisswig at tapir.caltech.edu
Tue Mar 27 19:38:58 CDT 2012
User: reisswig
Date: 2012/03/27 07:38 PM
Modified:
/trunk/DataAnalysis/
DataAnalysis.py
Log:
PhaseAlignOverRange:
Fixed a bug in phase minimization found by Nick.
File Changes:
Directory: /trunk/DataAnalysis/
===============================
File [modified]: DataAnalysis.py
Delta lines: +5 -5
===================================================================
--- trunk/DataAnalysis/DataAnalysis.py 2012-03-21 15:30:39 UTC (rev 8)
+++ trunk/DataAnalysis/DataAnalysis.py 2012-03-28 00:38:58 UTC (rev 9)
@@ -737,13 +737,13 @@
# first, compute DeltaPhi analytically according to Boyle et al.
DeltaPhi = 0
for ii in range (0, subDF1.Length()):
- DeltaPhi += subDF1.f[ii]-subDF2.f[ii]
+ DeltaPhi += (subDF1.f[ii]-subDF2.f[ii]) / (subDF1.Length()-1)
DeltaPhi /= (x1-x0)
# Now compute error
err = 0
for ii in range (0, subDF1.Length()):
err += (subDF1.f[ii]-subDF2.f[ii]-DeltaPhi)**2
- err = sqrt(err)
+ #err = sqrt(err) # sqrt not necessary
#print minErr, err
if (err < minErr):
minErr = err
@@ -775,12 +775,12 @@
# first, compute DeltaPhi analytically according to Boyle et al.
DeltaPhi = 0
for ii in range (0, subDF1.Length()):
- DeltaPhi += subDF1.f[ii]-subDF2.f[ii]
- DeltaPhi /= (x1-x0)
+ DeltaPhi += (subDF1.f[ii]-subDF2.f[ii]) / (subDF1.Length()-1)
+ DeltaPhi /= (x1-x0)
err = 0
for ii in range (0, subDF1.Length()):
err += (subDF1.f[ii]-subDF2.f[ii]-DeltaPhi)**2
- err = sqrt(err)
+ #err = sqrt(err) # sqrt not necessary
#print err
if (err < minErr):
minErr = err
More information about the Commits
mailing list