lsst.jointcal  master-g9041cab851+13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
lsst::jointcal::PhotometryFit Class Reference

Class that handles the photometric least squares problem. More...

#include <PhotometryFit.h>

Inheritance diagram for lsst::jointcal::PhotometryFit:
lsst::jointcal::FitterBase

Public Member Functions

 PhotometryFit (std::shared_ptr< Associations > associations, std::shared_ptr< PhotometryModel > photometryModel)
 this is the only constructor More...
 
 PhotometryFit (PhotometryFit const &)=delete
 No copy or move: there is only ever one fitter of a given type. More...
 
 PhotometryFit (PhotometryFit &&)=delete
 
PhotometryFitoperator= (PhotometryFit const &)=delete
 
PhotometryFitoperator= (PhotometryFit &&)=delete
 
void assignIndices (std::string const &whatToFit) override
 Set parameters to fit and assign indices in the big matrix. More...
 
void offsetParams (Eigen::VectorXd const &delta) override
 Offset the parameters by the requested quantities. More...
 
void saveResultTuples (std::string const &tupleName) const override
 Save the full chi2 term per star that was used in the minimization, for debugging. More...
 
- Public Member Functions inherited from lsst::jointcal::FitterBase
 FitterBase (std::shared_ptr< Associations > associations)
 
 FitterBase (FitterBase const &)=delete
 No copy or move: there is only ever one fitter of a given type. More...
 
 FitterBase (FitterBase &&)=delete
 
FitterBaseoperator= (FitterBase const &)=delete
 
FitterBaseoperator= (FitterBase &&)=delete
 
MinimizeResult minimize (std::string const &whatToFit, double nSigmaCut=0)
 Does a 1 step minimization, assuming a linear model. More...
 
Chi2Statistic computeChi2 () const
 Returns the chi2 for the current state. More...
 
void leastSquareDerivatives (TripletList &tripletList, Eigen::VectorXd &grad) const
 Evaluates the chI^2 derivatives (Jacobian and gradient) for the current whatToFit setting. More...
 

Additional Inherited Members

- Protected Member Functions inherited from lsst::jointcal::FitterBase
unsigned findOutliers (double nSigmaCut, MeasuredStarList &msOutliers, FittedStarList &fsOutliers) const
 Find Measurements and references contributing more than a cut, computed as

\[ <chi2> + nSigmaCut + rms(chi2). \]

The outliers are NOT removed, and no refit is done. More...

 
void outliersContributions (MeasuredStarList &msOutliers, FittedStarList &fsOutliers, TripletList &tripletList, Eigen::VectorXd &grad)
 Contributions to derivatives from (presumably) outlier terms. More...
 
void removeMeasOutliers (MeasuredStarList &outliers)
 Remove measuredStar outliers from the fit. No Refit done. More...
 
void removeRefOutliers (FittedStarList &outliers)
 Remove refStar outliers from the fit. No Refit done. More...
 
- Protected Attributes inherited from lsst::jointcal::FitterBase
std::shared_ptr< Associations_associations
 
std::string _whatToFit
 
int _lastNTrip
 
unsigned int _nParTot
 
unsigned _nMeasuredStars
 

Detailed Description

Class that handles the photometric least squares problem.

Definition at line 20 of file PhotometryFit.h.

Constructor & Destructor Documentation

lsst::jointcal::PhotometryFit::PhotometryFit ( std::shared_ptr< Associations associations,
std::shared_ptr< PhotometryModel photometryModel 
)
inline

this is the only constructor

Definition at line 23 of file PhotometryFit.h.

lsst::jointcal::PhotometryFit::PhotometryFit ( PhotometryFit const &  )
delete

No copy or move: there is only ever one fitter of a given type.

lsst::jointcal::PhotometryFit::PhotometryFit ( PhotometryFit &&  )
delete

Member Function Documentation

void lsst::jointcal::PhotometryFit::assignIndices ( std::string const &  whatToFit)
overridevirtual

Set parameters to fit and assign indices in the big matrix.

Parameters
[in]whatToFitValid 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.

Implements lsst::jointcal::FitterBase.

Definition at line 186 of file PhotometryFit.cc.

void lsst::jointcal::PhotometryFit::offsetParams ( Eigen::VectorXd const &  delta)
overridevirtual

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.

Parameters
[in]deltavector of offsets to apply

Implements lsst::jointcal::FitterBase.

Definition at line 212 of file PhotometryFit.cc.

PhotometryFit& lsst::jointcal::PhotometryFit::operator= ( PhotometryFit const &  )
delete
PhotometryFit& lsst::jointcal::PhotometryFit::operator= ( PhotometryFit &&  )
delete
void lsst::jointcal::PhotometryFit::saveResultTuples ( std::string const &  tupleName) const
overridevirtual

Save the full chi2 term per star that was used in the minimization, for debugging.

Saves results to text files "tupleName-meas" and "tupleName-ref" for the MeasuredStar and RefStar tuples, respectively. This method is mostly useful for debugging: we will probably want to create a better persistence system for jointcal's internal representations in the future.

Implements lsst::jointcal::FitterBase.

Definition at line 230 of file PhotometryFit.cc.


The documentation for this class was generated from the following files: