more refactoring
This commit is contained in:
@@ -3,7 +3,7 @@ import sys
|
||||
import numpy as np
|
||||
|
||||
import itertools
|
||||
from interp.tools import log, smberror
|
||||
from interp.tools import log
|
||||
|
||||
def get_phis(X, R):
|
||||
"""
|
||||
@@ -32,7 +32,7 @@ def get_phis(X, R):
|
||||
except np.linalg.LinAlgError as e:
|
||||
msg = "calculation of phis yielded a linearly dependant system (%s)" % e
|
||||
log.error(msg)
|
||||
raise smberror(msg)
|
||||
raise Exception(msg)
|
||||
phi = np.dot(np.linalg.pinv(A), b)
|
||||
|
||||
return phi
|
||||
@@ -256,10 +256,10 @@ def run_baker(X, R, S, order=2):
|
||||
if order == 1:
|
||||
answer['qlin'] = qlin
|
||||
return answer
|
||||
elif order in (2,3):
|
||||
elif order in (2,3,4):
|
||||
error_term, abc = get_error_sauron(phi, R, S, order)
|
||||
else:
|
||||
raise smberror('unsupported order for baker method')
|
||||
raise Exception('unsupported order for baker method')
|
||||
|
||||
q_final = qlin + error_term
|
||||
|
||||
|
||||
Reference in New Issue
Block a user