25 #ifndef LSST_JOINTCAL_ASTROMETRY_TRANSFORM_H 
   26 #define LSST_JOINTCAL_ASTROMETRY_TRANSFORM_H 
   48 class AstrometryTransformLinear;
 
   68     virtual void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const = 0;
 
   78         return Point(xout, yout);
 
  134     virtual double getJacobian(
const double x, 
const double y) 
const;
 
  142                                    const double step = 0.01) 
const;
 
  156                                                                   const Frame ®ion) 
const;
 
  165     virtual double paramRef(Eigen::Index 
const i) 
const;
 
  168     virtual double &
paramRef(Eigen::Index 
const i);
 
  214                                              AstrometryTransform 
const &right);
 
  225     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut)
 const override {
 
  232                 "AstrometryTransformIdentity is the identity transformation: it cannot be fit to anything.");
 
  237         return right.clone();
 
  249                            const double step = 0.01) 
const override;
 
  253                                                           const double step = 0.01) 
const override;
 
  272                                              AstrometryTransformIdentity 
const &right);
 
  311     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const override;
 
  315                            const double step = 0.01) 
const override;
 
  362     double paramRef(Eigen::Index 
const i) 
const override;
 
  365     double &
paramRef(Eigen::Index 
const i) 
override;
 
  379                       const bool useErrors);
 
  395     void computeMonomials(
double xIn, 
double yIn, 
double *monomial) 
const;
 
  402     ndarray::Array<double, 2, 2> toAstPolyMapCoefficients() 
const;
 
  448                            const double step = 0.01) 
const override;
 
  451                                                   const double step = 0.01) 
const override;
 
  459                               const double aa21, 
const double aa22);
 
  469                                                           const Frame ®ion) 
const override;
 
  518                                  const double scaleFactor = 1.0);
 
  557     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const override;
 
  586     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const;
 
  609                                    double &yTangentPlane) 
const = 0;
 
  639     virtual void pixToTangentPlane(
double xPixel, 
double yPixel, 
double &xTangentPlane,
 
  640                                    double &yTangentPlane) 
const;
 
  683     virtual void pixToTangentPlane(
double xPixel, 
double yPixel, 
double &xTangentPlane,
 
  684                                    double &yTangentPlane) 
const;
 
  727     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const;
 
  767     void apply(
const double xIn, 
const double yIn, 
double &xOut, 
double &yOut) 
const;
 
  777     const void *_userData;
 
std::unique_ptr< AstrometryTransformPolynomial > corr
 
virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane, double &yTangentPlane) const =0
Transform from pixels to tangent plane (degrees)
 
Point getCrPix() const
Get the pixel origin of the WCS (CRPIX in FITS WCS terminology, but zero-based)
 
BaseTanWcs(AstrometryTransformLinear const &pixToTan, Point const &tangentPoint, const AstrometryTransformPolynomial *corrections=nullptr)
 
AstrometryTransformLinear getLinPart() const
The Linear part (corresponding to CD's and CRPIX's)
 
const AstrometryTransformPolynomial * getCorr() const
Get a non-owning pointer to the correction transform polynomial.
 
void operator=(const BaseTanWcs &original)
 
virtual AstrometryTransformPolynomial getPixelToTangentPlane() const =0
Get a transform from pixels to tangent plane (degrees) This is a linear transform plus the effects of...
 
Point getTangentPoint() const
Get the sky origin (CRVAL in FITS WCS terminology) in degrees.
 
virtual void apply(const double xIn, const double yIn, double &xOut, double &yOut) const=0
 
AstrometryTransformLinear linPixelToTan
 
void setCorrections(std::unique_ptr< AstrometryTransformPolynomial > corrections)
Assign the correction polynomial (what it means is left to derived classes)
 
A Point with uncertainties.
 
rectangle with sides parallel to axes.
 
The transformation that handles pixels to sideral transformations (Gnomonic, possibly with polynomial...
 
std::unique_ptr< AstrometryTransform > inverseTransform(const double precision, const Frame ®ion) const
Inverse transform: returns a TanRaDecToPixel if there are no corrections, or the iterative solver if ...
 
TanPixelToRaDec operator*(AstrometryTransformLinear const &right) const
composition with AstrometryTransformLinear
 
std::unique_ptr< AstrometryTransform > clone() const
returns a copy (allocated by new) of the transformation.
 
TanRaDecToPixel inverted() const
approximate inverse : it ignores corrections;
 
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.
 
double fit(StarMatchList const &starMatchList)
Not implemented yet, because we do it otherwise.
 
virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane, double &yTangentPlane) const
transforms from pixel space to tangent plane (degrees)
 
void print(std::ostream &out) const
prints the transform coefficients to stream.
 
std::unique_ptr< AstrometryTransform > roughInverse(const Frame ®ion) const
Overload the "generic routine" (available for all AstrometryTransform types.
 
AstrometryTransformPolynomial getPixelToTangentPlane() const
the transformation from pixels to tangent plane (degrees)
 
This one is the Tangent Plane (called gnomonic) projection (from celestial sphere to tangent plane)
 
void transformPosAndErrors(const FatPoint &in, FatPoint &out) const
transform with analytical derivatives
 
Point getTangentPoint() const
tangent point coordinates (degrees)
 
double fit(StarMatchList const &starMatchList)
fits a transform to a std::list of Point pairs (p1,p2, the Point fields in StarMatch).
 
void setTangentPoint(Point const &tangentPoint)
Resets the projection (or tangent) point.
 
TanPixelToRaDec inverted() const
exact typed inverse:
 
std::unique_ptr< AstrometryTransform > clone() const
returns a copy (allocated by new) of the transformation.
 
virtual void apply(const double xIn, const double yIn, double &xOut, double &yOut) const=0
 
AstrometryTransformLinear getLinPart() const
The Linear part (corresponding to CD's and CRPIX's)
 
std::unique_ptr< AstrometryTransform > roughInverse(const Frame ®ion) const
Overload the "generic routine" (available for all AstrometryTransform types.
 
std::unique_ptr< AstrometryTransform > inverseTransform(const double precision, const Frame ®ion) const
Inverse transform: returns a TanPixelToRaDec.
 
void print(std::ostream &out) const
prints the transform coefficients to stream.
 
Implements the (forward) SIP distorsion scheme.
 
std::unique_ptr< AstrometryTransform > inverseTransform(const double precision, const Frame ®ion) const
Inverse transform: returns a TanRaDecToPixel if there are no corrections, or the iterative solver if ...
 
void print(std::ostream &out) const
prints the transform coefficients to stream.
 
double fit(StarMatchList const &starMatchList)
Not implemented yet, because we do it otherwise.
 
virtual void pixToTangentPlane(double xPixel, double yPixel, double &xTangentPlane, double &yTangentPlane) const
transforms from pixel space to tangent plane (degrees)
 
std::unique_ptr< AstrometryTransform > clone() const
returns a copy (allocated by new) of the transformation.
 
AstrometryTransformPolynomial getPixelToTangentPlane() const
the transformation from pixels to tangent plane (degrees)
 
Reports errors from accepting an object of an unexpected or inappropriate type.
 
def scale(algorithm, min, max=None, frame=None)
 
AstrometryTransformLinear normalizeCoordinatesTransform(const Frame &frame)
Returns the transformation that maps the input frame along both axes to [-1,1].
 
void() AstrometryTransformFun(const double, const double, double &, double &, const void *)
signature of the user-provided routine that actually does the coordinate transform for UserTransform.
 
bool isIntegerShift(const AstrometryTransform *transform)
Shorthand test to tell if a transform is a simple integer shift.
 
std::unique_ptr< AstrometryTransform > compose(AstrometryTransform const &left, AstrometryTransform const &right)
Returns a pointer to a composition of transforms, representing left(right()).
 
std::unique_ptr< AstrometryTransform > astrometryTransformRead(const std::string &fileName)
The virtual constructor from a file.
 
std::ostream & operator<<(std::ostream &stream, AstrometryMapping const &mapping)
 
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.
 
A base class for image defects.