Class PhotometryTransformChebyshev

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class PhotometryTransformChebyshev : public lsst::jointcal::PhotometryTransform

nth-order 2d Chebyshev photometry transform.

The 2-d Chebyshev polynomial used here is defined as:

\[ f(x,y) = \sum_i \sum_j a_{i,j} T_i(x) T_j(y) \]

where \(T_n(x)\) is the n-th order Chebyshev polynomial of \(x\) and \(a_{i,j}\) is the corresponding coefficient of the (i,j) polynomial term.

Note that the polynomial order=n means that the highest terms will be of the form:

\[ a_{0,n}*x^n*y^0, a_{n-1,1}*x^(n-1)*y^1, ..., a_{1,n-1}*x^1*y^(n-1), a_{n,0}*x^0*y^n \]

Subclassed by lsst::jointcal::FluxTransformChebyshev, lsst::jointcal::MagnitudeTransformChebyshev

Public Functions

PhotometryTransformChebyshev(size_t order, geom::Box2D const &bbox, bool identity)

Create a Chebyshev transform with terms up to order in (x*y).

Parameters
  • [in] order: The maximum order in (x*y).

  • [in] bbox: The bounding box it is valid within, to rescale it to [-1,1].

  • [in] identity: If true, set a_0,0==1, otherwise all coefficients are 0.

PhotometryTransformChebyshev(ndarray::Array<double, 2, 2> const &coefficients, geom::Box2D const &bbox)

Create a Chebyshev transform with the specified coefficients.

The polynomial order is determined from the number of coefficients, taking only the anti-diagonal upper triangle portion of the passed-in coefficients

Parameters
  • coefficients: The polynomial coefficients.

  • [in] bbox: The bounding box it is valid within, to rescale it to [-1,1].

double transformError(double x, double y, double value, double valueErr) const

Return the transformed valueErr at Point(x,y).

void dump(std::ostream &stream = std::cout) const

dumps the transform coefficients to stream.

std::size_t getNpar() const

Return the number of parameters (used to compute chisq)

void offsetParams(Eigen::VectorXd const &delta)

Offset the parameters by some (negative) amount during fitting.

Equivalent to flatten(parameters) -= delta

Ordering of delta is the same as the ordering of the derivatives returned from computeParameterDerivatives.

ndarray::Array<double, 2, 2> getCoefficients() const

Get a copy of the coefficients of the polynomials, as a 2d array (NOTE: layout is [y][x])

Eigen::VectorXd getParameters() const

Get a copy of the parameters of this model, in the same order as offsetParams.

ndarray::Size getOrder() const
geom::Box2D getBBox() const
double mean(geom::Box2D const &bbox) const

Compute the mean of this tranform on the bbox (default to our bbox).

double mean() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

double integrate(geom::Box2D const &bbox) const
double integrate() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Protected Functions

double computeChebyshev(double x, double y) const

Return the value of this polynomial at x,y. For use in the sublcass transform() methods.

void computeChebyshevDerivatives(double x, double y, Eigen::Ref<Eigen::VectorXd> derivatives) const

Set the derivatives of this polynomial at x,y. For use in the sublcass computeParameterDerivatives() methods.