pspline1_r8
index
/home/ap/pypspline/pypspline/pspline1_r8.py

1-D spline in real*8 precision

 
Modules
            
Numeric
fpspline
time
types
warnings
 
Classes
            
pspline
 
class pspline
       
   Methods defined here:
__init__(self, x1, bcs1=None)
Constructor.
 
x1: original grid array
 
bcs1: boundary conditions. Use bcs1=1 to apply
periodic boundary conditions (bcs1 defaults to None for
not-a-knot boundary conditions, this should be fine in most cases.
 
More general boundary conditions can be applied by setting
 
bcs1=(bmin, bmax)
 
where bmin/bmax can take values from 0 to 7, as described in
http://w3.pppl.gov/NTCC/PSPLINE/.
 
The boundary conditions (if inhomogeneous) must then be applied
by setting the class members
 
self.bcval1min and/or self.bcval1max
 
explicitly *prior* to calling setup(f).
 
1 -- match slope
2 -- match 2nd derivative
3 -- boundary condition is slope=0
4 -- boundary condition is d2f/dx2=0
5 -- match 1st derivative to 1st divided difference
6 -- match 2nd derivative to 2nd divided difference
7 -- match 3rd derivative to 3rd divided difference
 
For example, if one wishes to apply df/dx = a on the left and
 
d^2f/dx^2 = b
 
on the right of x1, use
 
bcs1=(1, 2)
 
and set both
 
self.bcval1min = a
 
and
 
self.bcval1max = b
 
The returned value is a spline object.
derivative(self, i1, p1, meth=None)
Compute the derivative d^i1 f/dx1^i1 at p1. Must have
i1>=0 and i1<=2. See interp method for a list of possible p1 shapes.
 
The meth argument has no effect, its purpose is to provide compatibility
with higher order spline methods.
 
With checks enabled.
derivative_array(self, i1, p1)
Compute the derivative d^i1 f/dx1^i1 for a grid-array p1. Must have
i1>=0 and i1<=2. Same as derivative_cloud in 1-D.
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
derivative_cloud(self, i1, p1)
Compute the derivative d^i1 f/dx1^i1 for a cloud p1. Must have
i1>=0 and i1<=2.
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
derivative_point(self, i1, p1)
Compute a single point derivative d^i1 f/dx1^i1 at p1. Must have
i1>=0 and i1<=2. 
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
interp(self, p1, meth=None)
Interpolatate onto p1, the coordinate which can either be a single point
(point interpolation) or an array  (cloud/array interpolation).
 
The returned value is a single float for point interpolation,
it is a rank-1 array of length len(p1) for cloud/array interpolation.
 
The meth argument has no effect, its purpose is to provide compatibility
with higher order spline methods.
 
With checks enabled.
interp_array(self, p1)
Array interpolation for all p1[i1], i1=0:len( p1 ).
In 1-D, this is the same as interp_cloud.
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
interp_cloud(self, p1)
Cloud interpolation for all p1[:].
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
interp_point(self, p1)
Point interpolation at p1.
 
Return the interpolated function, an error flag  (=0 if ok) and a warning flag (=0 if ok).
load(self, filename)
Save state in NetCDF file
save(self, filename)
Save state in NetCDF file
setup(self, f)
Set up (compute) cubic spline coefficients.
See __init__ for comment about boundary conditions.
 
Input is f[ix], a rank-1 array for the function values.

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pspline1_r8'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
Data
             ICT_F1 = array([0, 1])
ICT_FVAL = array([1, 0, 0])
ICT_GRAD = array([0, 1])
ICT_MAP = {0: array([1, 0, 0]), 1: array([0, 1, 0]), 2: array([0, 0, 1])}
__file__ = './pspline1_r8.pyc'
__name__ = 'pspline1_r8'