lsst.jointcal
master-g9041cab851+8
|
Polynomial transformation class. More...
#include <Gtransfo.h>
Public Member Functions | |
GtransfoPoly (const unsigned degree=1) | |
Default transfo : identity for all degrees (>=1 ). More... | |
GtransfoPoly (const Gtransfo *gtransfo, const Frame &frame, unsigned degree, unsigned nPoint=1000) | |
Constructs a "polynomial image" from an existing transfo, over a specified domain. More... | |
void | setDegree (const unsigned degree) |
void | apply (const double xIn, const double yIn, double &xOut, double &yOut) const |
void | computeDerivative (const Point &where, GtransfoLin &derivative, const double step=0.01) const |
specialised analytic routine More... | |
virtual void | transformPosAndErrors (const FatPoint &in, FatPoint &out) const |
a mix of apply and Derivative More... | |
unsigned | getDegree () const |
returns degree More... | |
int | getNpar () const |
total number of parameters More... | |
void | dump (std::ostream &stream=std::cout) const |
print out of coefficients in a readable form. More... | |
double | fit (const StarMatchList &starMatchList) |
guess what More... | |
GtransfoPoly | operator* (const GtransfoPoly &right) const |
Composition (internal stuff in quadruple precision) More... | |
GtransfoPoly | operator+ (const GtransfoPoly &right) const |
Addition. More... | |
GtransfoPoly | operator- (const GtransfoPoly &right) const |
Subtraction. More... | |
std::unique_ptr< Gtransfo > | reduceCompo (const Gtransfo *right) const |
to be overloaded by derived classes if they can really "reduce" the composition (e.g. More... | |
std::unique_ptr< Gtransfo > | clone () const |
returns a copy (allocated by new) of the transformation. More... | |
double | coeff (const unsigned powX, const unsigned powY, const unsigned whichCoord) const |
access to coefficients (read only) More... | |
double & | coeff (const unsigned powX, const unsigned powY, const unsigned whichCoord) |
write access More... | |
double | coeffOrZero (const unsigned powX, const unsigned powY, const unsigned whichCoord) const |
read access, zero if beyond degree More... | |
double | determinant () const |
double | paramRef (const int i) const |
double & | paramRef (const int i) |
void | paramDerivatives (const Point &where, double *dx, double *dy) const |
Derivative w.r.t parameters. More... | |
void | write (std::ostream &s) const |
void | read (std::istream &s) |
![]() | |
void | apply (const Point &in, Point &out) const |
applies the tranfo to in and writes into out. Is indeed virtual. More... | |
Point | apply (const Point &in) const |
All these apply(..) shadow the virtual one in derived classes, unless one writes "using
Gtransfo::apply". More... | |
std::string | __str__ () |
void | transformStar (FatPoint &in) const |
allows to write MyTransfo(MyStar) More... | |
virtual double | getJacobian (const Point &point) const |
returns the local jacobian. More... | |
virtual double | getJacobian (const double x, const double y) const |
returns the local jacobian. More... | |
virtual GtransfoLin | linearApproximation (const Point &where, const double step=0.01) const |
linear (local) approximation. More... | |
virtual void | transformErrors (const Point &where, const double *vIn, double *vOut) const |
transform errors (represented as double[3] in order V(xx),V(yy),Cov(xy)) More... | |
virtual std::unique_ptr< Gtransfo > | inverseTransfo (const double precision, const Frame ®ion) const |
returns an inverse transfo. Numerical if not overloaded. More... | |
void | getParams (double *params) const |
params should be at least Npar() long More... | |
void | offsetParams (const double *params) |
virtual std::unique_ptr< Gtransfo > | roughInverse (const Frame ®ion) const |
Rough inverse. More... | |
void | write (const std::string &fileName) const |
virtual | ~Gtransfo () |
Polynomial transformation class.
Definition at line 191 of file Gtransfo.h.
lsst::jointcal::GtransfoPoly::GtransfoPoly | ( | const unsigned | degree = 1 | ) |
Default transfo : identity for all degrees (>=1 ).
Default transfo : identity for all degrees (>=1 )
The degree refers to the highest total power (x+y) of monomials.
Definition at line 408 of file Gtransfo.cc.
lsst::jointcal::GtransfoPoly::GtransfoPoly | ( | const Gtransfo * | gtransfo, |
const Frame & | frame, | ||
unsigned | degree, | ||
unsigned | nPoint = 1000 |
||
) |
Constructs a "polynomial image" from an existing transfo, over a specified domain.
Definition at line 421 of file Gtransfo.cc.
|
virtual |
Implements lsst::jointcal::Gtransfo.
Definition at line 485 of file Gtransfo.cc.
|
inlinevirtual |
returns a copy (allocated by new) of the transformation.
Implements lsst::jointcal::Gtransfo.
Reimplemented in lsst::jointcal::GtransfoLin.
Definition at line 254 of file Gtransfo.h.
double lsst::jointcal::GtransfoPoly::coeff | ( | const unsigned | powX, |
const unsigned | powY, | ||
const unsigned | whichCoord | ||
) | const |
access to coefficients (read only)
Definition at line 650 of file Gtransfo.cc.
double & lsst::jointcal::GtransfoPoly::coeff | ( | const unsigned | powX, |
const unsigned | powY, | ||
const unsigned | whichCoord | ||
) |
write access
Definition at line 658 of file Gtransfo.cc.
double lsst::jointcal::GtransfoPoly::coeffOrZero | ( | const unsigned | powX, |
const unsigned | powY, | ||
const unsigned | whichCoord | ||
) | const |
read access, zero if beyond degree
Definition at line 663 of file Gtransfo.cc.
|
virtual |
specialised analytic routine
Reimplemented from lsst::jointcal::Gtransfo.
Reimplemented in lsst::jointcal::GtransfoLin.
Definition at line 508 of file Gtransfo.cc.
double lsst::jointcal::GtransfoPoly::determinant | ( | ) | const |
Definition at line 718 of file Gtransfo.cc.
|
virtual |
print out of coefficients in a readable form.
Implements lsst::jointcal::Gtransfo.
Definition at line 702 of file Gtransfo.cc.
|
virtual |
guess what
Implements lsst::jointcal::Gtransfo.
Reimplemented in lsst::jointcal::GtransfoLinRot, and lsst::jointcal::GtransfoLinShift.
Definition at line 816 of file Gtransfo.cc.
|
inline |
returns degree
Definition at line 232 of file Gtransfo.h.
|
inlinevirtual |
total number of parameters
Reimplemented from lsst::jointcal::Gtransfo.
Reimplemented in lsst::jointcal::GtransfoLinScale, lsst::jointcal::GtransfoLinRot, and lsst::jointcal::GtransfoLinShift.
Definition at line 235 of file Gtransfo.h.
GtransfoPoly lsst::jointcal::GtransfoPoly::operator* | ( | const GtransfoPoly & | right | ) | const |
Composition (internal stuff in quadruple precision)
Definition at line 943 of file Gtransfo.cc.
GtransfoPoly lsst::jointcal::GtransfoPoly::operator+ | ( | const GtransfoPoly & | right | ) | const |
Addition.
Definition at line 964 of file Gtransfo.cc.
GtransfoPoly lsst::jointcal::GtransfoPoly::operator- | ( | const GtransfoPoly & | right | ) | const |
Subtraction.
Definition at line 977 of file Gtransfo.cc.
|
virtual |
Derivative w.r.t parameters.
Derivatives should be al least 2*NPar long. first Npar, for x, last Npar for y.
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 682 of file Gtransfo.cc.
|
virtual |
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 672 of file Gtransfo.cc.
|
virtual |
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 677 of file Gtransfo.cc.
void lsst::jointcal::GtransfoPoly::read | ( | std::istream & | s | ) |
Definition at line 997 of file Gtransfo.cc.
|
virtual |
to be overloaded by derived classes if they can really "reduce" the composition (e.g.
composition of Polynomial can be reduced)
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 834 of file Gtransfo.cc.
void lsst::jointcal::GtransfoPoly::setDegree | ( | const unsigned | degree | ) |
Definition at line 464 of file Gtransfo.cc.
|
virtual |
a mix of apply and Derivative
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 566 of file Gtransfo.cc.
|
virtual |
Reimplemented from lsst::jointcal::Gtransfo.
Definition at line 987 of file Gtransfo.cc.