#NEWLINE# def spline_eval( kraw , mu , knots , coefs , order , kout ) : #NEWLINE# #INDENT# 'eval bkg(kraw) and chi(k) for knots, coefs, order' #NEWLINE# bkg = splev ( kraw , [ knots , chi , order ] ) #NEWLINE# chi = UnivariateSpline ( kraw , ( mu - bkg ) , s = 0 ) ( kout ) #NEWLINE# return ( bkg , chi )