lsst.jointcal
master-gc935ebf72c+13
|
Class that handles the photometric least squares problem. More...
#include <PhotometryFit.h>
Public Member Functions | |
PhotometryFit (Associations &associations, PhotometryModel *model) | |
this is the only constructor More... | |
bool | minimize (const std::string &whatToFit) |
Does a 1 step minimization, assuming a linear model. More... | |
void | LSDerivatives (TripletList &tripletList, Eigen::VectorXd &rhs) const |
Derivatives of the Chi2. More... | |
void | LSDerivatives (const CcdImage &ccdImage, TripletList &tripletList, Eigen::VectorXd &rhs, const MeasuredStarList *measuredStarList=nullptr) const |
Compute the derivatives for this CcdImage. More... | |
void | assignIndices (const std::string &whatToFit) |
Set parameter groups fixed or variable and assign indices to each parameter in the big matrix (which will be used by offsetParams(...). More... | |
void | offsetParams (const Eigen::VectorXd &delta) |
Offset the parameters by the requested quantities. More... | |
Chi2 | computeChi2 () const |
Returns a chi2 for the current state. More... | |
void | makeResTuple (const std::string &tupleName) const |
Produces an ntuple. More... | |
Class that handles the photometric least squares problem.
Definition at line 21 of file PhotometryFit.h.
lsst::jointcal::PhotometryFit::PhotometryFit | ( | Associations & | associations, |
PhotometryModel * | model | ||
) |
this is the only constructor
Definition at line 28 of file PhotometryFit.cc.
void lsst::jointcal::PhotometryFit::assignIndices | ( | const std::string & | whatToFit | ) |
Set parameter groups fixed or variable and assign indices to each parameter in the big matrix (which will be used by offsetParams(...).
[in] | whatToFit | Valid strings : "Model", "Fluxes", which define which parameter sets are going to be fitted. whatToFit="Model Fluxes" will set both parameter sets variable when computing derivatives. Provided it contains "Model", whatToFit is passed over to the PhotometryModel, and can hence be used to control more finely which subsets of the photometric model are being fitted, if the the actual PhotometryModel implements such a possibility. |
Definition at line 242 of file PhotometryFit.cc.
Chi2 lsst::jointcal::PhotometryFit::computeChi2 | ( | ) | const |
Returns a chi2 for the current state.
for the list of images in the provided association and the reference stars, if any
Definition at line 130 of file PhotometryFit.cc.
void lsst::jointcal::PhotometryFit::LSDerivatives | ( | TripletList & | tripletList, |
Eigen::VectorXd & | rhs | ||
) | const |
Derivatives of the Chi2.
Definition at line 38 of file PhotometryFit.cc.
void lsst::jointcal::PhotometryFit::LSDerivatives | ( | const CcdImage & | ccdImage, |
TripletList & | tripletList, | ||
Eigen::VectorXd & | rhs, | ||
const MeasuredStarList * | measuredStarList = nullptr |
||
) | const |
Compute the derivatives for this CcdImage.
The last argument allows to to process a sub-list (used for outlier removal)
Changes in this routine should be reflected into accumulateStat
Definition at line 45 of file PhotometryFit.cc.
void lsst::jointcal::PhotometryFit::makeResTuple | ( | const std::string & | tupleName | ) | const |
Produces an ntuple.
Definition at line 325 of file PhotometryFit.cc.
bool lsst::jointcal::PhotometryFit::minimize | ( | const std::string & | whatToFit | ) |
Does a 1 step minimization, assuming a linear model.
It calls assignIndices, LSDerivatives, solves the linear system and calls offsetParams. No line search. Relies on sparse linear algebra.
This is a complete Newton Raphson step. Compute first and second derivatives, solve for the step and apply it, without a line search.
[in] | whatToFit | Valid strings : "Model", "Fluxes", which define which parameter sets are going to be fitted. whatToFit="Model Fluxes" will set both parameter sets variable when computing derivatives. Provided it contains "Model", whatToFit is passed over to the PhotometryModel, and can hence be used to control more finely which subsets of the photometric model are being fitted, if the the actual PhotometryModel implements such a possibility. |
Definition at line 287 of file PhotometryFit.cc.
void lsst::jointcal::PhotometryFit::offsetParams | ( | const Eigen::VectorXd & | delta | ) |
Offset the parameters by the requested quantities.
The used parameter layout is the one from the last call to assignIndices or minimize(). There is no easy way to check that the current setting of whatToFit and the provided Delta vector are compatible. We can only test the size.
[in] | delta | vector of offsets to apply |
Definition at line 267 of file PhotometryFit.cc.