working on implementing the cubic interpolation. need to split that routine out of the run_baker method

This commit is contained in:
Stephen Mardson McQuay
2010-03-19 21:27:51 -06:00
parent f089848a1b
commit bd8f24d64f
4 changed files with 19 additions and 18 deletions
+8 -8
View File
@@ -27,8 +27,8 @@ def get_phis(X, R):
])
try:
phi = np.linalg.solve(A,b)
except:
print >> sys.stderr, "warning: get_phis: calculation of phis yielded a linearly dependant system"
except LinAlgError as e:
print >> sys.stderr, "warning: get_phis: calculation of phis yielded a linearly dependant system", e
raise smberror('get_phis')
phi = np.dot(np.linalg.pinv(A), b)
@@ -65,8 +65,8 @@ def get_phis_3D(X, r):
])
try:
phi = np.linalg.solve(A,b)
except:
print >> sys.stderr, "warning: get_phis_3D: calculation of phis yielded a linearly dependant system"
except LinAlgError as e:
print >> sys.stderr, "warning: get_phis_3D: calculation of phis yielded a linearly dependant system", e
phi = np.dot(np.linalg.pinv(A), b)
return phi
@@ -152,8 +152,8 @@ def run_baker(X, R, S):
# baker solve eq 10
try:
(a, b, c) = np.linalg.solve(A,b)
except:
print >> sys.stderr, "warning: run_baker: linear calculation went bad, resorting to np.linalg.pinv"
except LinAlgError as e:
print >> sys.stderr, "warning: run_baker: linear calculation went bad, resorting to np.linalg.pinv", e
(a, b, c) = np.dot(np.linalg.pinv(A), b)
error_term = a * phi[0] * phi[1]\
@@ -230,8 +230,8 @@ def run_baker_3D(X, R, S):
# baker solve eq 10
try:
(a, b, c, d, e, f) = np.linalg.solve(A,b)
except:
print >> sys.stderr, "warning: run_baker: linear calculation went bad, resorting to np.linalg.pinv"
except np.linalg.LinAlgError as e:
print >> sys.stderr, "warning: run_baker: linear calculation went bad, resorting to np.linalg.pinv", e
(a, b, c, d, e, f) = np.dot(np.linalg.pinv(A), b)
error_term = a * phi[0] * phi[1]\