LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
LSSTDataManagementBasePackage
AstrometryTransform.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 /*
3  * This file is part of jointcal.
4  *
5  * Developed for the LSST Data Management System.
6  * This product includes software developed by the LSST Project
7  * (https://www.lsst.org).
8  * See the COPYRIGHT file at the top-level directory of this distribution
9  * for details of code ownership.
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <https://www.gnu.org/licenses/>.
23  */
24 
25 #ifndef LSST_JOINTCAL_ASTROMETRY_TRANSFORM_H
26 #define LSST_JOINTCAL_ASTROMETRY_TRANSFORM_H
27 
28 #include <iostream>
29 #include <memory>
30 #include <string>
31 #include <sstream>
32 #include <vector>
33 
34 #include "Eigen/Core"
35 
36 #include "lsst/pex/exceptions.h"
37 #include "lsst/afw/geom/SkyWcs.h"
38 #include "lsst/jointcal/FatPoint.h"
39 #include "lsst/jointcal/Frame.h"
40 
42 
43 namespace lsst {
44 namespace jointcal {
45 
46 class StarMatchList;
47 class Frame;
48 class AstrometryTransformLinear;
49 
51 
66 public:
68  virtual void apply(const double xIn, const double yIn, double &xOut, double &yOut) const = 0;
69 
71  void apply(Point const &in, Point &out) const { apply(in.x, in.y, out.x, out.y); }
72 
75  Point apply(Point const &in) const {
76  double xout, yout;
77  apply(in.x, in.y, xout, yout);
78  return Point(xout, yout);
79  }
80 
89  Frame apply(Frame const &inputframe, bool inscribed) const;
90 
92  virtual void dump(std::ostream &stream = std::cout) const = 0;
93 
96  dump(s);
97  return s.str();
98  }
99 
101 
105  virtual double fit(StarMatchList const &starMatchList) = 0;
106 
107  void transformStar(FatPoint &in) const { transformPosAndErrors(in, in); }
108 
110  virtual double getJacobian(Point const &point) const { return getJacobian(point.x, point.y); }
111 
113  virtual std::unique_ptr<AstrometryTransform> clone() const = 0;
114 
132 
134  virtual double getJacobian(const double x, const double y) const;
135 
141  virtual void computeDerivative(Point const &where, AstrometryTransformLinear &derivative,
142  const double step = 0.01) const;
143 
145  virtual AstrometryTransformLinear linearApproximation(Point const &where, const double step = 0.01) const;
146 
147  virtual void transformPosAndErrors(const FatPoint &in, FatPoint &out) const;
148 
150  virtual void transformErrors(Point const &where, const double *vIn, double *vOut) const;
151 
153 
155  virtual std::unique_ptr<AstrometryTransform> inverseTransform(const double precision,
156  const Frame &region) const;
157 
159  void getParams(double *params) const;
160 
162  void offsetParams(Eigen::VectorXd const &delta);
163 
165  virtual double paramRef(Eigen::Index const i) const;
166 
168  virtual double &paramRef(Eigen::Index const i);
169 
172  virtual void paramDerivatives(Point const &where, double *dx, double *dy) const;
173 
175 
177  virtual std::unique_ptr<AstrometryTransform> roughInverse(const Frame &region) const;
178 
180  virtual std::size_t getNpar() const { return 0; }
181 
190  throw std::logic_error("toAstMap is not implemented for this class.");
191  }
192 
193  void write(const std::string &fileName) const;
194 
195  virtual void write(std::ostream &stream) const;
196 
197  virtual ~AstrometryTransform(){};
198 };
199 
202 
215  AstrometryTransform const &right);
216 
217 /*=============================================================*/
219 
221 public:
224 
226  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const override {
227  xOut = xIn;
228  yOut = yIn;
229  } // to speed up
230 
231  double fit(StarMatchList const &starMatchList) override {
232  throw pexExcept::TypeError(
233  "AstrometryTransformIdentity is the identity transformation: it cannot be fit to anything.");
234  }
235 
238  return right.clone();
239  }
240 
241  void dump(std::ostream &stream = std::cout) const override { stream << "x' = x\ny' = y" << std::endl; }
242 
243  std::size_t getNpar() const override { return 0; }
244 
247  }
248 
249  void computeDerivative(Point const &where, AstrometryTransformLinear &derivative,
250  const double step = 0.01) const override;
251 
254  const double step = 0.01) const override;
255 
257  std::shared_ptr<ast::Mapping> toAstMap(jointcal::Frame const &domain) const override;
258 
259  void write(std::ostream &s) const override;
260 
261  void read(std::istream &s);
262 
263  // ClassDef(AstrometryTransformIdentity,1)
264 };
265 
273  AstrometryTransformIdentity const &right);
274 
276 bool isIntegerShift(const AstrometryTransform *transform);
277 
278 /*==================== AstrometryTransformPolynomial =======================*/
279 
282 public:
289 
292  std::size_t order, std::size_t nPoint = 1000);
293 
303  jointcal::Frame const &domain, std::size_t order,
304  std::size_t nSteps = 50);
305 
307  void setOrder(std::size_t order);
309  std::size_t getOrder() const { return _order; }
310 
311  using AstrometryTransform::apply; // to unhide AstrometryTransform::apply(Point const &)
312 
313  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const override;
314 
316  void computeDerivative(Point const &where, AstrometryTransformLinear &derivative,
317  const double step = 0.01) const override;
318 
320  virtual void transformPosAndErrors(const FatPoint &in, FatPoint &out) const override;
321 
323  std::size_t getNpar() const override { return 2 * _nterms; }
324 
326  void dump(std::ostream &stream = std::cout) const override;
327 
329  double fit(StarMatchList const &starMatchList) override;
330 
332  AstrometryTransformPolynomial operator*(AstrometryTransformPolynomial const &right) const;
333 
336 
339 
340  using AstrometryTransform::composeAndReduce; // to unhide
341  // AstrometryTransform::composeAndReduce(AstrometryTransform
342  // const &)
345 
348  }
349 
351  double coeff(std::size_t powX, std::size_t powY, std::size_t whichCoord) const;
352 
354  double &coeff(std::size_t powX, std::size_t powY, std::size_t whichCoord);
355 
357  double coeffOrZero(std::size_t powX, std::size_t powY, std::size_t whichCoord) const;
358 
359  double determinant() const;
360 
362  double paramRef(Eigen::Index const i) const override;
363 
365  double &paramRef(Eigen::Index const i) override;
366 
369  void paramDerivatives(Point const &where, double *dx, double *dy) const override;
370 
372  std::shared_ptr<ast::Mapping> toAstMap(jointcal::Frame const &domain) const override;
373 
374  void write(std::ostream &s) const override;
375  void read(std::istream &s);
376 
377 private:
378  double computeFit(StarMatchList const &starMatchList, AstrometryTransform const &shiftToCenter,
379  const bool useErrors);
380 
381  std::size_t _order; // The highest sum of exponents of the largest monomial.
382  std::size_t _nterms; // number of parameters per coordinate
383  std::vector<double> _coeffs; // the actual coefficients
384  // both polynomials in a single vector to speed up allocation and copies
385 
386  /* use std::vector rather than double * to avoid
387  writing copy constructor and "operator =".
388  Vect would work as well but introduces a dependence
389  that can be avoided */
390 
391  /* This routine take a double * for the vector because the array can
392  then be allocated on the execution stack, which speeds thing
393  up. However this uses Variable Length Array (VLA) which is not
394  part of C++, but gcc implements it. */
395  void computeMonomials(double xIn, double yIn, double *monomial) const;
396 
402  ndarray::Array<double, 2, 2> toAstPolyMapCoefficients() const;
403 };
404 
417  Frame const &domain,
418  double const precision,
419  std::size_t maxOrder = 9,
420  std::size_t nSteps = 50);
421 
423 
424 /*=============================================================*/
427 public:
428  using AstrometryTransformPolynomial::apply; // to unhide AstrometryTransform::apply(Point const &)
429 
432 
434  explicit AstrometryTransformLinear(AstrometryTransformPolynomial const &transform);
435 
437  AstrometryTransformLinear operator*(AstrometryTransformLinear const &right) const;
438 
440  AstrometryTransformLinear inverted() const;
441 
442  // useful? double jacobian(const double x, const double y) const { return determinant();}
443 
445  void computeDerivative(Point const &where, AstrometryTransformLinear &derivative,
446  const double step = 0.01) const;
448  AstrometryTransformLinear linearApproximation(Point const &where, const double step = 0.01) const;
449 
450  // void dump(std::ostream &stream = std::cout) const;
451 
452  // double fit(StarMatchList const &starMatchList);
453 
455  AstrometryTransformLinear(const double ox, const double oy, const double aa11, const double aa12,
456  const double aa21, const double aa22);
457 
460 
463  }
464 
465  std::unique_ptr<AstrometryTransform> inverseTransform(const double precision, const Frame &region) const;
466 
467  double A11() const { return coeff(1, 0, 0); }
468  double A12() const { return coeff(0, 1, 0); }
469  double A21() const { return coeff(1, 0, 1); }
470  double A22() const { return coeff(0, 1, 1); }
471  double Dx() const { return coeff(0, 0, 0); }
472  double Dy() const { return coeff(0, 0, 1); }
473 
474 protected:
475  double &a11() { return coeff(1, 0, 0); }
476  double &a12() { return coeff(0, 1, 0); }
477  double &a21() { return coeff(1, 0, 1); }
478  double &a22() { return coeff(0, 1, 1); }
479  double &dx() { return coeff(0, 0, 0); }
480  double &dy() { return coeff(0, 0, 1); }
481 
482  friend class AstrometryTransform;
483  friend class AstrometryTransformIdentity; // for AstrometryTransform::Derivative
484  friend class AstrometryTransformPolynomial; // // for AstrometryTransform::Derivative
485 
486 private:
487  void setOrder(std::size_t order); // to hide AstrometryTransformPolynomial::setOrder
488 };
489 
490 /*=============================================================*/
491 
494 public:
495  using AstrometryTransform::apply; // to unhide AstrometryTransform::apply(Point const &)
497  AstrometryTransformLinearShift(double ox = 0., double oy = 0.)
498  : AstrometryTransformLinear(ox, oy, 1., 0., 0., 1.) {}
500  : AstrometryTransformLinear(point.x, point.y, 1., 0., 0., 1.){};
501  double fit(StarMatchList const &starMatchList);
502 
503  std::size_t getNpar() const { return 2; }
504 };
505 
506 /*=============================================================*/
509 public:
510  using AstrometryTransform::apply; // to unhide apply(const Point&)
511 
513  AstrometryTransformLinearRot(const double angleRad, const Point *center = nullptr,
514  const double scaleFactor = 1.0);
515  double fit(StarMatchList const &starMatchList);
516 
517  std::size_t getNpar() const { return 4; }
518 };
519 
520 /*=============================================================*/
521 
524 public:
525  using AstrometryTransform::apply; // to unhide apply(const Point&)
528  : AstrometryTransformLinear(0.0, 0.0, scale, 0., 0., scale){};
530  AstrometryTransformLinearScale(const double scaleX, const double scaleY)
531  : AstrometryTransformLinear(0.0, 0.0, scaleX, 0., 0., scaleY){};
532 
533  std::size_t getNpar() const { return 2; }
534 };
535 
547 public:
549 
551 
552  // Input is x, y pixels; output is ICRS RA, Dec in degrees
553  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const override;
554 
555  void dump(std::ostream &stream = std::cout) const override;
556 
558  double fit(const StarMatchList &starMatchList) override;
559 
561 
562  std::shared_ptr<afw::geom::SkyWcs> getSkyWcs() const { return _skyWcs; }
563 
564 private:
566 };
567 
568 /*==================WCS's transform's =====================================*/
569 
571 public:
572  using AstrometryTransform::apply; // to unhide apply(const Point&)
573 
574  BaseTanWcs(AstrometryTransformLinear const &pixToTan, Point const &tangentPoint,
575  const AstrometryTransformPolynomial *corrections = nullptr);
576 
577  BaseTanWcs(const BaseTanWcs &original);
578 
579  void operator=(const BaseTanWcs &original);
580 
582  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const;
583 
585  Point getTangentPoint() const;
586 
588  AstrometryTransformLinear getLinPart() const;
589 
591  const AstrometryTransformPolynomial *getCorr() const { return corr.get(); }
592 
594  void setCorrections(std::unique_ptr<AstrometryTransformPolynomial> corrections);
595 
597  Point getCrPix() const;
598 
601  virtual AstrometryTransformPolynomial getPixelToTangentPlane() const = 0;
602 
604  virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane,
605  double &yTangentPlane) const = 0;
606 
607  ~BaseTanWcs();
608 
609 protected:
610  AstrometryTransformLinear linPixelToTan; // transform from pixels to tangent plane (degrees)
611  // a linear approximation centered at the pixel and sky origins
613  double ra0, dec0; // sky origin (radians)
614  double cos0, sin0; // cos(dec0), sin(dec0)
615 };
616 
617 class TanRaDecToPixel; // the inverse of TanPixelToRaDec.
618 
623 class TanPixelToRaDec : public BaseTanWcs {
624 public:
625  using AstrometryTransform::apply; // to unhide apply(const Point&)
628  TanPixelToRaDec(AstrometryTransformLinear const &pixToTan, Point const &tangentPoint,
629  const AstrometryTransformPolynomial *corrections = nullptr);
630 
632  AstrometryTransformPolynomial getPixelToTangentPlane() const;
633 
635  virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane,
636  double &yTangentPlane) const;
637 
638  TanPixelToRaDec();
639 
641  TanPixelToRaDec operator*(AstrometryTransformLinear const &right) const;
642 
643  using AstrometryTransform::composeAndReduce; // to unhide
644  // AstrometryTransform::composeAndReduce(AstrometryTransform
645  // const &)
648 
650  TanRaDecToPixel inverted() const;
651 
654 
657  std::unique_ptr<AstrometryTransform> inverseTransform(const double precision, const Frame &region) const;
658 
660 
661  void dump(std::ostream &stream) const;
662 
664  double fit(StarMatchList const &starMatchList);
665 };
666 
669 public:
672  TanSipPixelToRaDec(AstrometryTransformLinear const &pixToTan, Point const &tangentPoint,
673  const AstrometryTransformPolynomial *corrections = nullptr);
674 
676  AstrometryTransformPolynomial getPixelToTangentPlane() const;
677 
679  virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane,
680  double &yTangentPlane) const;
681 
683 
686  std::unique_ptr<AstrometryTransform> inverseTransform(const double precision, const Frame &region) const;
687 
689 
690  void dump(std::ostream &stream) const;
691 
693  double fit(StarMatchList const &starMatchList);
694 };
695 
697 
704 public:
705  using AstrometryTransform::apply; // to unhide apply(const Point&)
706 
708  TanRaDecToPixel(AstrometryTransformLinear const &tan2Pix, Point const &tangentPoint);
709 
711  TanRaDecToPixel();
712 
714  AstrometryTransformLinear getLinPart() const;
715 
717  void setTangentPoint(Point const &tangentPoint);
718 
720  Point getTangentPoint() const;
721 
723  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const;
724 
726  void transformPosAndErrors(const FatPoint &in, FatPoint &out) const;
727 
729  TanPixelToRaDec inverted() const;
730 
733 
735  std::unique_ptr<AstrometryTransform> inverseTransform(const double precision, const Frame &region) const;
736 
737  void dump(std::ostream &stream) const;
738 
740 
741  double fit(StarMatchList const &starMatchList);
742 
743 private:
744  double ra0, dec0; // tangent point (radians)
745  double cos0, sin0;
746  AstrometryTransformLinear linTan2Pix; // tangent plane (probably degrees) to pixels
747 };
748 
750 typedef void(AstrometryTransformFun)(const double, const double, double &, double &, const void *);
751 
757 public:
758  using AstrometryTransform::apply; // to unhide apply(const Point&)
759 
761  UserTransform(AstrometryTransformFun &fun, const void *userData);
762 
763  void apply(const double xIn, const double yIn, double &xOut, double &yOut) const;
764 
765  void dump(std::ostream &stream = std::cout) const;
766 
767  double fit(StarMatchList const &starMatchList);
768 
770 
771 private:
772  AstrometryTransformFun *_userFun;
773  const void *_userData;
774 };
775 
780 } // namespace jointcal
781 } // namespace lsst
782 
783 #endif // LSST_JOINTCAL_ASTROMETRY_TRANSFORM_H
AstrometryTransformLinearShift(double ox=0., double oy=0.)
Add ox and oy.
std::unique_ptr< AstrometryTransform > clone() const override
returns a copy (allocated by new) of the transformation.
virtual void paramDerivatives(Point const &where, double *dx, double *dy) const
Derivative w.r.t parameters.
std::unique_ptr< AstrometryTransform > clone() const
returns a copy (allocated by new) of the transformation.
void() AstrometryTransformFun(const double, const double, double &, double &, const void *)
signature of the user-provided routine that actually does the coordinate transform for UserTransform...
The transformation that handles pixels to sideral transformations (Gnomonic, possibly with polynomial...
std::size_t getNpar() const override
returns the number of parameters (to compute chi2&#39;s)
void apply(Point const &in, Point &out) const
applies the tranfo to in and writes into out. Is indeed virtual.
implements the linear transformations (6 real coefficients).
A point in a plane.
Definition: Point.h:36
AstrometryTransformLinear linPixelToTan
bool isIntegerShift(const AstrometryTransform *transform)
Shorthand test to tell if a transform is a simple integer shift.
std::ostream & operator<<(std::ostream &stream, AstrometryTransform const &transform)
Delegates to transform.dump()
std::size_t getNpar() const
total number of parameters
virtual std::size_t getNpar() const
returns the number of parameters (to compute chi2&#39;s)
void apply(const double xIn, const double yIn, double &xOut, double &yOut) const override
def scale(algorithm, min, max=None, frame=None)
Definition: ds9.py:109
virtual double paramRef(Eigen::Index const i) const
AstrometryTransformLinear(AstrometryTransformIdentity const &)
Handy converter:
T endl(T... args)
std::unique_ptr< AstrometryTransform > composeAndReduce(AstrometryTransform const &right) const override
Return a reduced composition of newTransform = this(right()), or nullptr if it cannot be reduced...
std::shared_ptr< Image< PixelT > > operator+(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator+()
Definition: ImageSlice.cc:69
T right(T... args)
int y
Definition: SpanSet.cc:49
Implements the (forward) SIP distorsion scheme.
virtual void computeDerivative(Point const &where, AstrometryTransformLinear &derivative, const double step=0.01) const
Computes the local Derivative of a transform, w.r.t.
void getParams(double *params) const
params should be at least Npar() long
void apply(const double xIn, const double yIn, double &xOut, double &yOut) const override
xOut = xIn; yOut = yIn !
void write(const std::string &fileName) const
std::shared_ptr< AstrometryTransformPolynomial > inversePolyTransform(AstrometryTransform const &forward, Frame const &domain, double const precision, std::size_t maxOrder=9, std::size_t nSteps=50)
Approximate the inverse by a polynomial, to some precision.
std::size_t getNpar() const
total number of parameters
virtual std::unique_ptr< AstrometryTransform > inverseTransform(const double precision, const Frame &region) const
returns an inverse transform. Numerical if not overloaded.
virtual void transformPosAndErrors(const FatPoint &in, FatPoint &out) const
STL class.
A Point with uncertainties.
Definition: FatPoint.h:34
std::unique_ptr< AstrometryTransformPolynomial > corr
STL class.
double x
coordinate
Definition: Point.h:41
Point apply(Point const &in) const
All these apply(..) shadow the virtual one in derived classes, unless one writes "using AstrometryTra...
std::size_t getOrder() const
Returns the polynomial order.
std::unique_ptr< AstrometryTransform > clone() const override
returns a copy (allocated by new) of the transformation.
rectangle with sides parallel to axes.
Definition: Frame.h:38
AstrometryTransformLinear normalizeCoordinatesTransform(const Frame &frame)
Returns the transformation that maps the input frame along both axes to [-1,1].
A base class for image defects.
virtual std::unique_ptr< AstrometryTransform > composeAndReduce(AstrometryTransform const &right) const
Return a reduced composition of newTransform = this(right()), or nullptr if it cannot be reduced...
int const step
AstrometryTransformLinear()
the default constructor constructs the do-nothing transformation.
std::unique_ptr< AstrometryTransform > compose(AstrometryTransform const &left, AstrometryTransform const &right)
Returns a pointer to a composition of transforms, representing left(right()).
T str(T... args)
This one is the Tangent Plane (called gnomonic) projection (from celestial sphere to tangent plane) ...
just here to provide a specialized constructor, and fit.
void offsetParams(Eigen::VectorXd const &delta)
virtual AstrometryTransformLinear linearApproximation(Point const &where, const double step=0.01) const
linear (local) approximation.
double x
std::shared_ptr< Image< PixelT > > operator-(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator-()
Definition: ImageSlice.cc:89
A do-nothing transformation. It anyway has dummy routines to mimick a AstrometryTransform.
std::unique_ptr< AstrometryTransform > astrometryTransformRead(const std::string &fileName)
The virtual constructor from a file.
virtual void transformErrors(Point const &where, const double *vIn, double *vOut) const
transform errors (represented as double[3] in order V(xx),V(yy),Cov(xy))
table::Key< table::Array< double > > coeff
Definition: PsfexPsf.cc:362
AstrometryTransformLinearScale(const double scaleX, const double scaleY)
STL class.
a virtual (interface) class for geometric transformations.
STL class.
virtual std::unique_ptr< AstrometryTransform > roughInverse(const Frame &region) const
Rough inverse.
std::size_t getNpar() const override
total number of parameters
std::size_t getNpar() const
total number of parameters
std::shared_ptr< afw::geom::SkyWcs > getSkyWcs() const
just here to provide a specialized constructor, and fit.
virtual double fit(StarMatchList const &starMatchList)=0
fits a transform to a std::list of Point pairs (p1,p2, the Point fields in StarMatch).
double fit(StarMatchList const &starMatchList) override
fits a transform to a std::list of Point pairs (p1,p2, the Point fields in StarMatch).
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167
virtual std::shared_ptr< ast::Mapping > toAstMap(jointcal::Frame const &domain) const
Create an equivalent AST mapping for this transformation, including an analytic inverse if possible...
A run-time transform that allows users to define a AstrometryTransform with minimal coding (just the ...
STL class.
T forward(T... args)
virtual std::unique_ptr< AstrometryTransform > clone() const =0
returns a copy (allocated by new) of the transformation.
virtual void dump(std::ostream &stream=std::cout) const =0
dumps the transform coefficients to stream.
just here to provide specialized constructors. AstrometryTransformLinear fit routine.
void dump(std::ostream &stream=std::cout) const override
dumps the transform coefficients to stream.
virtual void apply(const double xIn, const double yIn, double &xOut, double &yOut) const =0
void transformStar(FatPoint &in) const
A AstrometryTransform that holds a SkyWcs.
virtual double getJacobian(Point const &point) const
returns the local jacobian.
const AstrometryTransformPolynomial * getCorr() const
Get a non-owning pointer to the correction transform polynomial.