spline | index /usr/local/python/epics/spline.py |
Cubic spline approximation class.
Last Modified 9/9/97 by Johann Hibschman <johann@physics.berkeley.edu>
To create a default ("natural") spline, simply use sp = Spline(x,y).
To specify the slope of the function at either of the endpoints,
use the "low_slope" and "high_slope" keywords.
Example usage:
>>> x = arange(10, typecode=Float) * 0.3
>>> y = cos(x)
>>> sp = Spline(x, y)
>>> print sp(0.5), cos(0.5)
0.878364380585 0.87758256189
Uses "searchsorted" from the Numeric module, aka "binarysearch" in older
versions.
Modules | ||||||
|
Classes | ||||||||||||||||||
|
Functions | ||
|
Data | ||
BadInput = 'Bad xa input to routine splint.' Character = 'c' Complex = 'D' Complex0 = 'F' Complex16 = 'F' Complex32 = 'F' Complex64 = 'D' Complex8 = 'F' Float = 'd' Float0 = 'f' Float16 = 'f' Float32 = 'f' Float64 = 'd' Float8 = 'f' Int = 'l' Int0 = '1' Int16 = 's' Int32 = 'i' Int8 = '1' LittleEndian = 1 NewAxis = None PrecisionError = 'PrecisionError' PyObject = 'O' UInt = 'u' UInt16 = 'w' UInt32 = 'u' UInt8 = 'b' UnsignedInt16 = 'w' UnsignedInt32 = 'u' UnsignedInt8 = 'b' UnsignedInteger = 'u' __file__ = './spline.pyc' __name__ = 'spline' absolute = <ufunc 'absolute'> add = <ufunc 'add'> arccos = <ufunc 'arccos'> arccosh = <ufunc 'arccosh'> arcsin = <ufunc 'arcsin'> arcsinh = <ufunc 'arcsinh'> arctan = <ufunc 'arctan'> arctan2 = <ufunc 'arctan2'> arctanh = <ufunc 'arctanh'> bitwise_and = <ufunc 'bitwise_and'> bitwise_or = <ufunc 'bitwise_or'> bitwise_xor = <ufunc 'bitwise_xor'> ceil = <ufunc 'ceil'> conjugate = <ufunc 'conjugate'> cos = <ufunc 'cos'> cosh = <ufunc 'cosh'> divide = <ufunc 'divide'> divide_safe = <ufunc 'divide_safe'> e = 2.7182818284590451 equal = <ufunc 'equal'> exp = <ufunc 'exp'> fabs = <ufunc 'fabs'> floor = <ufunc 'floor'> floor_divide = <ufunc 'floor_divide'> fmod = <ufunc 'fmod'> greater = <ufunc 'greater'> greater_equal = <ufunc 'greater_equal'> hypot = <ufunc 'hypot'> invert = <ufunc 'invert'> left_shift = <ufunc 'left_shift'> less = <ufunc 'less'> less_equal = <ufunc 'less_equal'> log = <ufunc 'log'> log10 = <ufunc 'log10'> logical_and = <ufunc 'logical_and'> logical_not = <ufunc 'logical_not'> logical_or = <ufunc 'logical_or'> logical_xor = <ufunc 'logical_xor'> maximum = <ufunc 'maximum'> minimum = <ufunc 'minimum'> multiply = <ufunc 'multiply'> negative = <ufunc 'negative'> not_equal = <ufunc 'not_equal'> pi = 3.1415926535897931 power = <ufunc 'power'> remainder = <ufunc 'remainder'> right_shift = <ufunc 'right_shift'> sin = <ufunc 'sin'> sinh = <ufunc 'sinh'> sqrt = <ufunc 'sqrt'> subtract = <ufunc 'subtract'> tan = <ufunc 'tan'> tanh = <ufunc 'tanh'> true_divide = <ufunc 'true_divide'> typecodes = {'Character': 'c', 'Complex': 'FD', 'Float': 'fd', 'Integer': '1sil', 'UnsignedInteger': 'bwu'} |