lsst.jointcal  master-ga8493ae4fe+2
PhotometryModel.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_PHOTOMETRY_MODEL_H
3 #define LSST_JOINTCAL_PHOTOMETRY_MODEL_H
4 
8 #include <string>
9 #include <vector>
10 
11 namespace lsst {
12 namespace jointcal {
13 
14 class CcdImage;
15 class Point;
16 class MeasuredStar;
17 
20 public:
29  virtual unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex) = 0;
30 
38  virtual void offsetParams(Eigen::VectorXd const &delta) = 0;
39 
50  virtual double photomFactor(CcdImage const &ccdImage, Point const &where) const = 0;
51 
53  PhotometryMapping const &getMapping(CcdImage const &ccdImage) const {
54  return *(this->findMapping(ccdImage, "getMapping"));
55  }
56 
63  virtual void getMappingIndices(CcdImage const &ccdImage, std::vector<unsigned> &indices) = 0;
64 
72  virtual void computeParameterDerivatives(MeasuredStar const &measuredStar, CcdImage const &ccdImage,
73  Eigen::VectorXd &derivatives) = 0;
74 
75  // //! number of parameters to be read in indices.size()
76  // virtual void setIndicesAndDerivatives(MeasuredStar const &measuredStar, CcdImage const &ccdImage,
77  // std::vector<unsigned> &indices, Eigen::VectorXd &D) = 0;
78 
79  virtual ~PhotometryModel(){};
80 
81 protected:
83  virtual PhotometryMapping *findMapping(CcdImage const &ccdImage, std::string name) const = 0;
84 };
85 } // namespace jointcal
86 } // namespace lsst
87 
88 #endif // LSST_JOINTCAL_PHOTOMETRY_MODEL_H
virtual unsigned assignIndices(std::string const &whatToFit, unsigned firstIndex)=0
Assign indices to parameters involved in mappings, starting at firstIndex.
A point in a plane.
Definition: Point.h:13
PhotometryMapping const & getMapping(CcdImage const &ccdImage) const
Get the mapping associated with ccdImage.
Class for a simple mapping implementing a generic Gtransfo.
Definition: Associations.h:24
virtual void offsetParams(Eigen::VectorXd const &delta)=0
Offset the parameters by the provided amounts.
virtual void getMappingIndices(CcdImage const &ccdImage, std::vector< unsigned > &indices)=0
Get how this set of parameters (of length Npar()) map into the "grand" fit.
virtual PhotometryMapping * findMapping(CcdImage const &ccdImage, std::string name) const =0
Return a pointer to the mapping associated with this ccdImage. name is for describing error messages...
objects measured on actual images.
Definition: MeasuredStar.h:18
virtual double photomFactor(CcdImage const &ccdImage, Point const &where) const =0
Return the "photometric factor" at a given location on a ccdImage.
Interface class for PhotometryFit.
Handler of an actual image from a single CCD.
Definition: CcdImage.h:31
virtual void computeParameterDerivatives(MeasuredStar const &measuredStar, CcdImage const &ccdImage, Eigen::VectorXd &derivatives)=0
Compute the parametric derivatives of this model.