RangedPolynomial

class lsst.ts.mthexapod.RangedPolynomial(coeffs: list[float], min_x: float, max_x: float)

Bases: object

A polynomial that is linear outside a specified range.

This model is suitable for systems which are mostly linear, with minor nonlinear corrections. The idea is to prevent unrealistic values outside the range of values over which the polynomial coefficients were fit.

The equation is: ` y(x) = C0 + C1 x + C2 x^2 + ...   for min_x <= x <= max_x y(x) = y(min_y) + C1 (x - min_x)  for x < min_x y(x) = y(max_x) + C1 (x - max_x)  for x > max_x `

Parameters:
coeffslist [float]

Polynomial coefficients C0, C1, … Must contain at least one element.

min_xfloat

Minimum x below which the result is linear.

max_xfloat

Maximum x above which the result is linear.

Raises:
ValueError

If coeffs has no elements or min_x >= max_x.

Methods Summary

__call__(x)

Compute the value of the function.

Methods Documentation

__call__(x: float) float

Compute the value of the function.

Parameters:
xfloat

Input value.