lsst.jointcal  master-gc935ebf72c+13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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  typedef std::map<const CcdImage *, std::unique_ptr<SimpleGtransfoMapping> > mapType;
31  mapType _myMap;
32  const ProjectionHandler *_sky2TP;
33 
34 public:
36  SimplePolyModel(const CcdImageList &ccdImageList, const ProjectionHandler *projectionHandler,
37  bool initFromWCS, unsigned nNotFit = 0, unsigned degree = 3);
38 
39  // The following routines are the interface to AstrometryFit
41  const Mapping *getMapping(const CcdImage &) const;
42 
44  unsigned assignIndices(unsigned firstIndex, const std::string &whatToFit);
45 
46  // dispaches the offsets after a fit step into the actual locations of parameters
47  void offsetParams(const Eigen::VectorXd &delta);
48 
52  const Gtransfo *getSky2TP(const CcdImage &ccdImage) const { return _sky2TP->getSky2TP(ccdImage); }
53 
55  virtual void freezeErrorScales();
56 
58  const Gtransfo &getTransfo(const CcdImage &ccdImage) const;
59 
60  std::shared_ptr<TanSipPix2RaDec> produceSipWcs(const CcdImage &ccdImage) const;
61 
63 };
64 } // namespace jointcal
65 } // namespace lsst
66 
67 #endif // LSST_JOINTCAL_SIMPLE_POLY_MODEL_H
this is the model used to fit independent CCDs, meaning that there is no instrument model...
const Mapping * getMapping(const CcdImage &) const
Mapping associated to a given CcdImage.
virtual class needed in the abstraction of the distortion model
Definition: Mapping.h:15
void offsetParams(const Eigen::VectorXd &delta)
Offset the parameters by the provided amounts.
Interface class between AstrometryFit and an actual model for the Mapping (s) from pixels to some tan...
SimplePolyModel(const CcdImageList &ccdImageList, const ProjectionHandler *projectionHandler, bool initFromWCS, unsigned nNotFit=0, unsigned degree=3)
Sky2TP is just a name, it can be anything.
virtual const Gtransfo * getSky2TP(const CcdImage &ccdImage) const =0
const Gtransfo & getTransfo(const CcdImage &ccdImage) const
Access to mappings.
std::shared_ptr< TanSipPix2RaDec > produceSipWcs(const CcdImage &ccdImage) const
Cook up a SIP WCS.
This is a virtual class that allows a lot of freedom in the choice of the projection from &quot;Sky&quot; (wher...
const Gtransfo * getSky2TP(const CcdImage &ccdImage) const
the mapping of sky coordinates (i.e.
unsigned assignIndices(unsigned firstIndex, const std::string &whatToFit)
Positions the various parameter sets into the parameter vector, starting at firstIndex.
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:37
std::list< std::shared_ptr< CcdImage > > CcdImageList
Definition: CcdImage.h:22
Handler of an actual image from a single CCD.
Definition: CcdImage.h:31