lsst.jointcal  master-g9041cab851+13
 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 private:
33  typedef std::map<const CcdImage *, std::unique_ptr<TwoTransfoMapping>> mappingMapType;
34  mappingMapType _mappings;
35  typedef std::map<CcdIdType, std::unique_ptr<SimpleGtransfoMapping>> chipMapType;
36  chipMapType _chipMap;
37  typedef std::map<VisitIdType, std::unique_ptr<SimpleGtransfoMapping>> visitMapType;
38  visitMapType _visitMap;
39  const ProjectionHandler *_sky2TP;
40  bool _fittingChips, _fittingVisits;
41 
42  Frame _tpFrame; // just for output of the chip transfos
43 
44 public:
45  ConstrainedPolyModel(CcdImageList const &ccdImageList, ProjectionHandler const *projectionHandler,
46  bool initFromWCS, unsigned nNotFit = 0);
47 
53 
54  // The following routines are the interface to AstrometryFit
56  Mapping const *getMapping(CcdImage const &) const;
57 
62  unsigned assignIndices(unsigned firstIndex, std::string const &whatToFit);
63 
68  void offsetParams(Eigen::VectorXd const &Delta);
69 
74  void freezeErrorScales();
75 
77  Gtransfo const &getChipTransfo(CcdIdType const chip) const;
78 
80  Gtransfo const &getVisitTransfo(VisitIdType const &visit) const;
81 
83  std::vector<VisitIdType> getVisits() const;
84 
90  const Gtransfo *getSky2TP(CcdImage const &ccdImage) const { return _sky2TP->getSky2TP(ccdImage); }
91 
92  std::shared_ptr<TanSipPix2RaDec> produceSipWcs(CcdImage const &ccdImage) const;
93 };
94 } // namespace jointcal
95 } // namespace lsst
96 
97 #endif // LSST_JOINTCAL_CONSTRAINED_POLY_MODEL_H
ConstrainedPolyModel(CcdImageList const &ccdImageList, ProjectionHandler const *projectionHandler, bool initFromWCS, unsigned nNotFit=0)
void offsetParams(Eigen::VectorXd const &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
Gtransfo const & getChipTransfo(CcdIdType const chip) const
Access to mappings.
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
ConstrainedPolyModel & operator=(ConstrainedPolyModel const &)=delete
const Gtransfo * getSky2TP(CcdImage const &ccdImage) const
The mapping of sky coordinates (i.e.
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.
std::shared_ptr< TanSipPix2RaDec > produceSipWcs(CcdImage const &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...
a virtual (interface) class for geometric transformations.
Definition: Gtransfo.h:37
Gtransfo const & getVisitTransfo(VisitIdType const &visit) const
Access to mappings.
std::list< std::shared_ptr< CcdImage > > CcdImageList
Definition: CcdImage.h:22
Mapping const * getMapping(CcdImage const &) const
Mapping associated to a given CcdImage.
int VisitIdType
Definition: CcdImage.h:24
unsigned assignIndices(unsigned firstIndex, std::string const &whatToFit)
Positions the various parameter sets into the parameter vector, starting at firstIndex.
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)...