lsst.jointcal  master-gc935ebf72c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ConstrainedPolyModel.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_CONSTRAINED_POLY_MODEL_H
3 #define LSST_JOINTCAL_CONSTRAINED_POLY_MODEL_H
4 
5 #include "memory" // for std::*_ptr
6 
8 
9 class CcdImage;
10 
12 #include "lsst/jointcal/Gtransfo.h"
13 #include "lsst/jointcal/Frame.h"
17 #include "lsst/jointcal/CcdImage.h"
18 
19 #include <map>
20 
21 namespace lsst {
22 namespace jointcal {
23 
32  typedef std::map<const CcdImage *, std::unique_ptr<TwoTransfoMapping> > mappingMapType;
33  mappingMapType _mappings;
34  typedef std::map<CcdIdType, std::unique_ptr<SimpleGtransfoMapping> > chipMapType;
35  chipMapType _chipMap;
36  typedef std::map<VisitIdType, std::unique_ptr<SimpleGtransfoMapping> > visitMapType;
37  visitMapType _visitMap;
38  const ProjectionHandler *_sky2TP;
39  bool _fittingChips, _fittingVisits;
40 
41  Frame _tpFrame; // just for output of the chip transfos
42 
43 public:
44  ConstrainedPolyModel(const CcdImageList &ccdImageList, const ProjectionHandler *projectionHandler,
45  bool initFromWCS, unsigned nNotFit = 0);
46 
47  // The following routines are the interface to AstrometryFit
49  const Mapping *getMapping(const CcdImage &) const;
50 
55  unsigned assignIndices(unsigned firstIndex, const std::string &whatToFit);
56 
61  void offsetParams(const Eigen::VectorXd &Delta);
62 
67  void freezeErrorScales();
68 
70  const Gtransfo &getChipTransfo(const CcdIdType chip) const;
71 
73  const Gtransfo &getVisitTransfo(const VisitIdType &visit) const;
74 
76  std::vector<VisitIdType> getVisits() const;
77 
83  const Gtransfo *getSky2TP(const CcdImage &ccdImage) const { return _sky2TP->getSky2TP(ccdImage); }
84 
85  std::shared_ptr<TanSipPix2RaDec> produceSipWcs(const CcdImage &ccdImage) const;
86 };
87 } // namespace jointcal
88 } // namespace lsst
89 
90 #endif // LSST_JOINTCAL_CONSTRAINED_POLY_MODEL_H
unsigned assignIndices(unsigned firstIndex, const std::string &whatToFit)
Positions the various parameter sets into the parameter vector, starting at firstIndex.
void offsetParams(const Eigen::VectorXd &Delta)
Dispaches the offsets after a fit step into the actual locations of parameters.
virtual class needed in the abstraction of the distortion model
Definition: Mapping.h:15
std::shared_ptr< TanSipPix2RaDec > produceSipWcs(const CcdImage &ccdImage) const
Cook up a SIP WCS.
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
const Gtransfo & getChipTransfo(const CcdIdType chip) const
Access to mappings.
const Gtransfo & getVisitTransfo(const VisitIdType &visit) const
Access to mappings.
ConstrainedPolyModel(const CcdImageList &ccdImageList, const ProjectionHandler *projectionHandler, bool initFromWCS, unsigned nNotFit=0)
This is the model used to fit mappings as the combination of a transformation depending on the chip n...
rectangle with sides parallel to axes.
Definition: Frame.h:19
std::vector< VisitIdType > getVisits() const
Access to array of visits involved in the solution.
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.
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:37
std::list< std::shared_ptr< CcdImage > > CcdImageList
Definition: CcdImage.h:22
int VisitIdType
Definition: CcdImage.h:24
Handler of an actual image from a single CCD.
Definition: CcdImage.h:31
void freezeErrorScales()
From there on, measurement errors are propagated using the current transfos (and no longer evolve)...
const Mapping * getMapping(const CcdImage &) const
Mapping associated to a given CcdImage.