fixed discrepancy with Baker's eq 17.
This commit is contained in:
parent
3efe335563
commit
79880acad4
@ -149,12 +149,12 @@ def get_error_cubic(phi, R, S):
|
||||
# basing this on eq 17
|
||||
B.append(
|
||||
[
|
||||
phi1 * phi2, # a
|
||||
phi1 * phi3, # b
|
||||
phi2 * phi1, # c
|
||||
phi2 * phi3, # d
|
||||
phi3 * phi1, # e
|
||||
phi3 * phi2, # f
|
||||
phi1 * phi2 * phi2, # a
|
||||
phi1 * phi3 * phi3, # b
|
||||
phi2 * phi1 * phi1, # c
|
||||
phi2 * phi3 * phi3, # d
|
||||
phi3 * phi1 * phi1, # e
|
||||
phi3 * phi2 * phi2, # f
|
||||
phi1 * phi2 * phi3, # g
|
||||
]
|
||||
)
|
||||
@ -173,12 +173,12 @@ def get_error_cubic(phi, R, S):
|
||||
print >> sys.stderr, "warning: run_baker: linear calculation went bad, resorting to np.linalg.pinv", e
|
||||
(a, b, c, d, e, f, g) = np.dot(np.linalg.pinv(A), b)
|
||||
|
||||
error_term = a * phi[0] * phi[1]\
|
||||
+ b * phi[0] * phi[2]\
|
||||
+ c * phi[1] * phi[0]\
|
||||
+ d * phi[1] * phi[2]\
|
||||
+ e * phi[2] * phi[0]\
|
||||
+ f * phi[2] * phi[1]\
|
||||
error_term = a * phi[0] * phi[1] * phi[1]\
|
||||
+ b * phi[0] * phi[2] * phi[2]\
|
||||
+ c * phi[1] * phi[0] * phi[0]\
|
||||
+ d * phi[1] * phi[2] * phi[2]\
|
||||
+ e * phi[2] * phi[0] * phi[0]\
|
||||
+ f * phi[2] * phi[1] * phi[1]\
|
||||
+ g * phi[0] * phi[1] * phi[2]\
|
||||
|
||||
return error_term, a, b, c
|
||||
|
Loading…
Reference in New Issue
Block a user