3 #include "lsst/log/Log.h"
9 LOG_LOGGER _log = LOG_GET(
"jointcal.SimplePhotometryModel");
17 for (
auto const &ccdImage : ccdImageList) {
19 if (refVisit == -1) refVisit = visit;
20 if (visit == refVisit)
21 _myMap[ccdImage.get()].fixed =
true;
23 _myMap[ccdImage.get()].fixed =
false;
25 LOGLS_INFO(_log,
"SimplePhotometryModel: using exposure " << refVisit <<
" as photometric reference ");
29 unsigned ipar = firstIndex;
30 for (
auto const &i : _myMap) {
31 PhotomStuff pf = i.second;
32 if (pf.fixed)
continue;
40 for (
auto const &i : _myMap) {
41 PhotomStuff pf = i.second;
42 if (!pf.fixed) pf.factor += delta[pf.index];
46 SimplePhotometryModel::PhotomStuff &SimplePhotometryModel::find(
const CcdImage &ccdImage) {
47 auto i = _myMap.find(&ccdImage);
48 if (i == _myMap.end())
49 throw LSST_EXCEPT(pex::exceptions::InvalidParameterError,
50 "SimplePolyModel::find, cannot find CcdImage " + ccdImage.
getName());
54 const SimplePhotometryModel::PhotomStuff &SimplePhotometryModel::find(
const CcdImage &ccdImage)
const {
55 auto i = _myMap.find(&ccdImage);
56 if (i == _myMap.end())
57 throw LSST_EXCEPT(pex::exceptions::InvalidParameterError,
58 "SimplePolyModel::find, cannot find CcdImage " + ccdImage.getName());
63 const PhotomStuff &pf = find(ccdImage);
68 const CcdImage &ccdImage, std::vector<unsigned> &indices,
70 PhotomStuff &pf = find(ccdImage);
76 indices[0] = pf.index;
void getIndicesAndDerivatives(const MeasuredStar &measuredStar, const CcdImage &ccdImage, std::vector< unsigned > &indices, Eigen::VectorXd &D)
number of parameters to be read in indices.size()
unsigned assignIndices(const std::string &whatToFit, unsigned firstIndex)
Assign indices to parameters involved in mappings, starting at firstIndex.
objects measured on actual images.
SimplePhotometryModel(const CcdImageList &ccdImageList)
std::list< std::shared_ptr< CcdImage > > CcdImageList
void offsetParams(const Eigen::VectorXd &delta)
Offset the parameters by the provided amounts.
double photomFactor(const CcdImage &ccdImage, const Point &where=Point()) const
Return the "photometric factor" for this ccdImage.
Handler of an actual image from a single CCD.
std::string getName() const
Return the _name that identifies this ccdImage.