lsst.jointcal  16.0-17-g0bdc215+13
SimpleAstrometryModel.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_SIMPLE_ASTROMETRY_MODEL_H
3 #define LSST_JOINTCAL_SIMPLE_ASTROMETRY_MODEL_H
4 
5 #include "memory"
6 
8 
10 #include "lsst/jointcal/Gtransfo.h"
13 #include <map>
14 
15 namespace lsst {
16 namespace jointcal {
17 
18 class CcdImage;
19 
20 /* We deal here with coordinate transforms which are fitted
21  and/or necessary to AstrometryFit. The classes SimpleAstrometryModel
22 and SimplePolyMapping implement a model where there is one
23 separate transfrom per CcdImage. One could chose other setups.
24 
25 */
26 
28 /* This modeling of distortions can even accommodate images set mixing instruments */
30 public:
32  SimpleAstrometryModel(CcdImageList const &ccdImageList,
34  unsigned nNotFit = 0, unsigned order = 3);
35 
41 
42  // The following routines are the interface to AstrometryFit
44  const AstrometryMapping *getMapping(CcdImage const &) const override;
45 
47  unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex) override;
48 
49  // dispaches the offsets after a fit step into the actual locations of parameters
50  void offsetParams(Eigen::VectorXd const &delta) override;
51 
56  return _sky2TP->getSky2TP(ccdImage);
57  }
58 
60  void freezeErrorTransform() override;
61 
63  int getTotalParameters() const override;
64 
66  Gtransfo const &getTransfo(CcdImage const &ccdImage) const;
67 
69  std::shared_ptr<afw::geom::SkyWcs> makeSkyWcs(CcdImage const &ccdImage) const override;
70 
72 
73 private:
76 
78  AstrometryMapping *findMapping(CcdImage const &ccdImage) const override;
79 };
80 } // namespace jointcal
81 } // namespace lsst
82 
83 #endif // LSST_JOINTCAL_SIMPLE_ASTROMETRY_MODEL_H
Gtransfo const & getTransfo(CcdImage const &ccdImage) const
Access to mappings.
SimpleAstrometryModel(CcdImageList const &ccdImageList, const std::shared_ptr< ProjectionHandler const > projectionHandler, bool initFromWCS, unsigned nNotFit=0, unsigned order=3)
Sky2TP is just a name, it can be anything.
const AstrometryMapping * getMapping(CcdImage const &) const override
Mapping associated to a given CcdImage.
void offsetParams(Eigen::VectorXd const &delta) override
Offset the parameters by the provided amounts (by -delta).
Interface class between AstrometryFit and an actual model for the Mapping (s) from pixels to some tan...
SimpleAstrometryModel & operator=(SimpleAstrometryModel const &)=delete
STL class.
std::shared_ptr< afw::geom::SkyWcs > makeSkyWcs(CcdImage const &ccdImage) const override
Make a SkyWcs that contains this model.
const std::shared_ptr< Gtransfo const > getSky2TP(CcdImage const &ccdImage) const override
the mapping of sky coordinates (i.e.
Class for a simple mapping implementing a generic Gtransfo.
this is the model used to fit independent CCDs, meaning that there is no instrument model...
int getTotalParameters() const override
Return the total number of parameters in this model.
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:42
virtual class needed in the abstraction of the distortion model
Handler of an actual image from a single CCD.
Definition: CcdImage.h:41
unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex) override
Positions the various parameter sets into the parameter vector, starting at firstIndex.