Template Class Chebyshev1Function2

Inheritance Relationships

Base Type

Class Documentation

template<typename ReturnT>
class Chebyshev1Function2 : public lsst::afw::math::BasePolynomialFunction2<ReturnT>

2-dimensional weighted sum of Chebyshev polynomials of the first kind.

f(x,y) = c0 T0(x’) T0(y’) # order 0

  • c1 T1(x’) T0(y’) + c2 T0(x’) T1(y’) # order 1

  • c3 T2(x’) T0(y’) + c4 T1(x’) T1(y’) + c5 T0(x’) T2(y’) # order 2

= c0 # order 0

  • c1 T1(x’) + c2 T1(y’) # order 1

  • c3 T2(x’) + c4 T1(x’) T1(y’) + c5 T2(y’) # order 2

where:

  • Tn(x) is the nth Chebyshev function of the first kind: T0(x) = 1 T1(x) = x Tn+1(x) = 2xTn(x) + Tn-1(x)

  • x’ is x offset and scaled to range [-1, 1] as x ranges over [minX, maxX]

  • y’ is y offset and scaled to range [-1, 1] as y ranges over [minY, maxY]

Return value is incorrect if function arguments are not in the range [minX, maxX], [minY, maxY].

Public Functions

Chebyshev1Function2(unsigned int order, lsst::geom::Box2D const &xyRange = lsst::geom::Box2D(lsst::geom::Point2D(-1.0, ), ))

Parameters
  • order: order of polynomial (0 for constant)

  • xyRange: allowed x,y range

Construct a Chebyshev polynomial of specified order and range.

The parameters are initialized to zero.

Chebyshev1Function2(std::vector<double> params, lsst::geom::Box2D const &xyRange = lsst::geom::Box2D(lsst::geom::Point2D(-1.0, ), ))

Parameters
  • params: polynomial coefficients length must be one of 1, 3, 6, 10, 15…

  • xyRange: allowed x,y range

Construct a Chebyshev polynomial with specified parameters and range.

The order of the polynomial is set to the length of the params vector.

Exceptions
  • lsst::pex::exceptions::InvalidParameterError: if params is empty

Chebyshev1Function2(Chebyshev1Function2 const&)
Chebyshev1Function2(Chebyshev1Function2&&)
Chebyshev1Function2 &operator=(Chebyshev1Function2 const&)
Chebyshev1Function2 &operator=(Chebyshev1Function2&&)
~Chebyshev1Function2()
std::shared_ptr<Function2<ReturnT>> clone() const

Return a pointer to a deep copy of this function

This function exists instead of a copy constructor so one can obtain a copy of an actual function instead of a useless copy of the base class.

Every non-virtual function must override this method.

Return

a pointer to a deep copy of the function

lsst::geom::Box2D getXYRange() const

Get x,y range

virtual Chebyshev1Function2 truncate(int truncOrder) const

Parameters
  • truncOrder: order of truncated polynomial

Return a truncated copy of lower (or equal) order

Exceptions
  • lsst::pex::exceptions::InvalidParameter: if truncated order > original order

ReturnT operator()(double x, double y) const
std::string toString(std::string const&) const

Return a string representation of the function

Return

a string representation of the function

bool isPersistable() const

Return true if this particular object can be persisted using afw::table::io.

Protected Functions

std::string getPersistenceName() const

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

void write(afw::table::io::OutputArchiveHandle &handle) const

Write the object to one or more catalogs.

The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.

Chebyshev1Function2()