lsst.jointcal  14.0-23-g746c5c5+2
SimplePolyModel.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_SIMPLE_POLY_MODEL_H
3 #define LSST_JOINTCAL_SIMPLE_POLY_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 SimplePolyModel
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:
33  bool initFromWCS, unsigned nNotFit = 0, unsigned degree = 3);
34 
36  SimplePolyModel(SimplePolyModel const &) = delete;
37  SimplePolyModel(SimplePolyModel &&) = delete;
38  SimplePolyModel &operator=(SimplePolyModel const &) = delete;
40 
41  // The following routines are the interface to AstrometryFit
43  const Mapping *getMapping(CcdImage const &) const;
44 
46  unsigned assignIndices(unsigned firstIndex, std::string const &whatToFit);
47 
48  // dispaches the offsets after a fit step into the actual locations of parameters
49  void offsetParams(Eigen::VectorXd const &delta);
50 
54  const Gtransfo *getSky2TP(CcdImage const &ccdImage) const { return _sky2TP->getSky2TP(ccdImage); }
55 
57  virtual void freezeErrorTransform();
58 
60  Gtransfo const &getTransfo(CcdImage const &ccdImage) const;
61 
63 
65 
66 private:
68  mapType _myMap;
69  const ProjectionHandler *_sky2TP;
70 };
71 } // namespace jointcal
72 } // namespace lsst
73 
74 #endif // LSST_JOINTCAL_SIMPLE_POLY_MODEL_H
this is the model used to fit independent CCDs, meaning that there is no instrument model...
virtual class needed in the abstraction of the distortion model
Definition: Mapping.h:15
const Gtransfo * getSky2TP(CcdImage const &ccdImage) const
the mapping of sky coordinates (i.e.
Interface class between AstrometryFit and an actual model for the Mapping (s) from pixels to some tan...
virtual const Gtransfo * getSky2TP(const CcdImage &ccdImage) const =0
STL class.
STL class.
SimplePolyModel & operator=(SimplePolyModel const &)=delete
Gtransfo const & getTransfo(CcdImage const &ccdImage) const
Access to mappings.
unsigned assignIndices(unsigned firstIndex, std::string const &whatToFit)
Positions the various parameter sets into the parameter vector, starting at firstIndex.
Class for a simple mapping implementing a generic Gtransfo.
SimplePolyModel(CcdImageList const &ccdImageList, ProjectionHandler const *projectionHandler, bool initFromWCS, unsigned nNotFit=0, unsigned degree=3)
Sky2TP is just a name, it can be anything.
This is a virtual class that allows a lot of freedom in the choice of the projection from "Sky" (wher...
void offsetParams(Eigen::VectorXd const &delta)
Offset the parameters by the provided amounts.
const Mapping * getMapping(CcdImage const &) const
Mapping associated to a given CcdImage.
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:41
std::shared_ptr< TanSipPix2RaDec > produceSipWcs(CcdImage const &ccdImage) const
Cook up a SIP WCS.
Handler of an actual image from a single CCD.
Definition: CcdImage.h:35