lsst.jointcal  master-g59ec7209dd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ConstrainedPhotometryModel.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_CONSTRAINED_PHOTOMETRY_MODEL_H
3 #define LSST_JOINTCAL_CONSTRAINED_PHOTOMETRY_MODEL_H
4 
5 #include <map>
6 
10 
11 namespace lsst {
12 namespace jointcal {
13 
15 public:
16  explicit ConstrainedPhotometryModel(CcdImageList const &ccdImageList) {
17  for (auto const &ccdImage : ccdImageList) {
18  _myMap[ccdImage] = std::unique_ptr<PhotometryMapping>(
20  }
21  }
22 
28 
29  unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex) override { return 0; }
30 
31  void offsetParams(Eigen::VectorXd const &delta) override {
32  for (auto &i : _myMap) {
33  i.second->offsetParams(&delta(i.second->getIndex()));
34  }
35  }
36 
37  double photomFactor(CcdImage const &ccdImage, Point const &where) const override { return 0; }
38 
39  void getMappingIndices(CcdImage const &ccdImage, std::vector<unsigned> &indices) override {}
40 
41  void computeParameterDerivatives(MeasuredStar const &measuredStar, CcdImage const &ccdImage,
42  Eigen::VectorXd &derivatives) override {}
43 
44 private:
45  PhotometryMapping *findMapping(CcdImage const &ccdImage, std::string name) const override {
46  return nullptr; // waiting on creation of ConstrainedPhotometryModel.cc
47  // auto i = _myMap.find(&ccdImage);
48  // if (i == _myMap.end())
49  // throw LSST_EXCEPT(pex::exceptions::InvalidParameterError,
50  // "SimplePolyModel::" + name + ", cannot find CcdImage " + ccdImage.getName());
51  // return i->second.get();
52  }
53 
54  typedef std::map<std::shared_ptr<CcdImage>, std::unique_ptr<PhotometryMapping>> MapType;
55  MapType _myMap;
56  // typedef std::map<VisitIdType, std::unique_ptr<ConstrainedPhotometryMapping>> VisitMapType;
57  // VisitMapType _visitMap;
58  // typedef std::map<CcdIdType, std::unique_ptr<ConstrainedPhotometryMapping>> ChipMapType;
59  // ChipMapType _chipMap;
60 };
61 
62 } // namespace jointcal
63 } // namespace lsst
64 
65 #endif // LSST_JOINTCAL_CONSTRAINED_PHOTOMETRY_MODEL_H
A point in a plane.
Definition: Point.h:13
double photomFactor(CcdImage const &ccdImage, Point const &where) const override
Return the &quot;photometric factor&quot; at a given location on a ccdImage.
ConstrainedPhotometryModel(CcdImageList const &ccdImageList)
void computeParameterDerivatives(MeasuredStar const &measuredStar, CcdImage const &ccdImage, Eigen::VectorXd &derivatives) override
Compute the parametric derivatives of this model.
unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex) override
Assign indices to parameters involved in mappings, starting at firstIndex.
void getMappingIndices(CcdImage const &ccdImage, std::vector< unsigned > &indices) override
Get how this set of parameters (of length Npar()) map into the &quot;grand&quot; fit.
objects measured on actual images.
Definition: MeasuredStar.h:18
void offsetParams(Eigen::VectorXd const &delta) override
Offset the parameters by the provided amounts.
Interface class for PhotometryFit.
std::list< std::shared_ptr< CcdImage > > CcdImageList
Definition: CcdImage.h:22
Handler of an actual image from a single CCD.
Definition: CcdImage.h:31
ConstrainedPhotometryModel & operator=(ConstrainedPhotometryModel const &)=delete