lsst.jointcal  15.0-8-g11095dd+1
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;
45 
47  unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex);
48 
49  // dispaches the offsets after a fit step into the actual locations of parameters
50  void offsetParams(Eigen::VectorXd const &delta);
51 
56  return _sky2TP->getSky2TP(ccdImage);
57  }
58 
60  virtual void freezeErrorTransform();
61 
63  Gtransfo const &getTransfo(CcdImage const &ccdImage) const;
64 
67 
69 
70 private:
73 
75  AstrometryMapping *findMapping(CcdImage const &ccdImage) const;
76 };
77 } // namespace jointcal
78 } // namespace lsst
79 
80 #endif // LSST_JOINTCAL_SIMPLE_ASTROMETRY_MODEL_H
const std::shared_ptr< Gtransfo const > getSky2TP(CcdImage const &ccdImage) const
the mapping of sky coordinates (i.e.
void offsetParams(Eigen::VectorXd const &delta)
Offset the parameters by the provided amounts.
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.
Interface class between AstrometryFit and an actual model for the Mapping (s) from pixels to some tan...
SimpleAstrometryModel & operator=(SimpleAstrometryModel const &)=delete
STL class.
STL class.
std::shared_ptr< afw::geom::SkyWcs > makeSkyWcs(CcdImage const &ccdImage) const
Make a SkyWcs that contains this model.
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...
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:42
const AstrometryMapping * getMapping(CcdImage const &) const
Mapping associated to a given CcdImage.
virtual class needed in the abstraction of the distortion model
Handler of an actual image from a single CCD.
Definition: CcdImage.h:35
unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex)
Positions the various parameter sets into the parameter vector, starting at firstIndex.