pyrokinetics.units.UnitSpline2D

pyrokinetics.units.UnitSpline2D#

class pyrokinetics.units.UnitSpline2D(x, y, z)[source]#

Bases: RectBivariateSpline

Unit-aware wrapper classes for 2D splines.

Parameters:
  • x (pint.Quantity) – x-coordinates to pass to SciPy splines, with units.

  • y (pint.Quantity) – y-coordinates to pass to SciPy splines, with units.

  • z (pint.Quantity) – z-coordinates to pass to SciPy splines, with units.

__init__(x, y, z)[source]#

Methods

__init__(x, y, z)

ev(xi, yi[, dx, dy])

Evaluate the spline at points

get_coeffs()

Return spline coefficients.

get_knots()

Return a tuple (tx,ty) where tx,ty contain knots positions of the spline with respect to x-, y-variable, respectively.

get_residual()

Return weighted sum of squared residuals of the spline approximation: sum ((w[i]*(z[i]-s(x[i],y[i])))**2,axis=0)

integral(xa, xb, ya, yb)

Evaluate the integral of the spline over area [xa,xb] x [ya,yb].

partial_derivative(dx, dy)

Construct a new spline representing a partial derivative of this spline.