2 #ifndef LSST_JOINTCAL_ASTROMETRY_FIT_H
3 #define LSST_JOINTCAL_ASTROMETRY_FIT_H
58 std::string _whatToFit;
59 bool _fittingDistortions, _fittingPos, _fittingRefrac, _fittingPM;
62 double _referenceColor, _sigCol;
64 double _refractionCoefficient;
65 unsigned int _refracPosInMatrix;
69 unsigned int _nParDistortions;
70 unsigned int _nParPositions;
71 unsigned int _nParTot;
72 unsigned _nMeasuredStars;
110 unsigned minimize(
const std::string &whatToFit,
const double nSigRejCut = 0);
168 Eigen::VectorXd &grad);
184 unsigned removeOutliers(
double nSigmaCut,
const std::string &measOrRef =
"Meas Ref");
205 const std::string &measOrRef =
"Meas Ref")
const;
229 const Point &refractionVector,
double refractionCoeff,
double mjd)
const;
231 template <
class ListType,
class Accum>
232 void accumulateStatImageList(ListType &list, Accum &accum)
const;
234 template <
class ImType,
class Accum>
235 void accumulateStatImage(ImType &image, Accum &accum)
const;
237 template <
class Accum>
238 void accumulateStatRefStars(Accum &accum)
const;
241 void setMeasuredStarIndices(
const MeasuredStar &ms, std::vector<unsigned> &indices)
const;
245 #endif // LSST_JOINTCAL_ASTROMETRY_FIT_H
void outliersContributions(MeasuredStarList &mOutliers, FittedStarList &fOutLiers, TripletList &tList, Eigen::VectorXd &grad)
Contributions to derivatives from (presumably) outlier terms.
void makeMeasResTuple(const std::string &tupleName) const
Produces a tuple containing residuals of measurement terms.
unsigned findOutliers(double nSigmaCut, MeasuredStarList &mSOutliers, FittedStarList &fSOutliers, const std::string &measOrRef="Meas Ref") const
Find Measurements and references contributing more than a cut, computed as The outliers are NOT remo...
void makeResTuple(const std::string &tupleName) const
Produces both ntuples (cook up names from the provided string)
void freezeErrorScales()
The transformations used to propagate errors are freezed to the current state.
void LSDerivatives(TripletList &tList, Eigen::VectorXd &rhs) const
Evaluates the chI^2 derivatives (Jacobian and gradient) for the current whatToFit setting...
Interface class between AstrometryFit and an actual model for the Mapping (s) from pixels to some tan...
unsigned removeOutliers(double nSigmaCut, const std::string &measOrRef="Meas Ref")
Discards measurements and reference contributions contributing to the chi2 more than nSigmaCut...
void removeMeasOutliers(MeasuredStarList &outliers)
Just removes outliers from the fit. No Refit done.
The class that implements the relations between MeasuredStar and FittedStar.
void LSDerivatives1(const CcdImage &ccdImage, TripletList &tList, Eigen::VectorXd &rhs, const MeasuredStarList *msList=nullptr) const
Compute derivatives of measurement terms for this CcdImage.
unsigned minimize(const std::string &whatToFit, const double nSigRejCut=0)
Does a 1 step minimization, assuming a linear model.
A list of MeasuredStar. They are usually filled in Associations::AddImage.
Simple structure to accumulate Chi2 and Ndof.
void makeRefResTuple(const std::string &tupleName) const
Produces a tuple containing residuals of reference terms.
virtual void freezeErrorScales()=0
A list of FittedStar s. Such a list is typically constructed by Associations.
Chi2 computeChi2() const
Returns a chi2 for the current state.
objects measured on actual images.
void assignIndices(const std::string &whatToFit)
Set parameter groups fixed or variable and assign indices to each parameter in the big matrix (which ...
void removeRefOutliers(FittedStarList &outliers)
Just removes outliers from the fit. No Refit done.
AstrometryFit(Associations &associations, AstrometryModel *astrometryModel, double posError)
this is the only constructor
Class that handles the astrometric least squares problem.
a virtual (interface) class for geometric transformations.
Handler of an actual image from a single CCD.
void checkStuff()
DEBUGGING routine.
void offsetParams(const Eigen::VectorXd &delta)
Offset the parameters by the requested quantities.
The objects which have been measured several times.
void LSDerivatives2(const FittedStarList &fsl, TripletList &tList, Eigen::VectorXd &rhs) const
Compute derivatives of reference terms (if any), associated to the FittedStarList.