4 #ifndef SMOOTHMODELFITTER_H
5 #define SMOOTHMODELFITTER_H
23 Poly2(
const double XMin,
const double YMin,
24 const double XMax,
const double YMax,
28 void Monomials(
const double &X,
const double &Y, Vect &M)
const;
31 bool Compute(
const double X,
const double Y, Vect
const& coeffs,
double& val)
const;
38 unsigned NTerms()
const {
return nterms_;}
41 bool Read(std::istream &S);
42 void Write(std::ostream &S)
const;
45 void DecreaseDegree();
56 class SmoothModelFitter
59 SmoothModelFitter(
Associations& assoc,
unsigned int deg);
61 ~SmoothModelFitter() { }
65 void LoopOnMeasurements(Op& op)
const;
68 bool Minimize(
unsigned int maxiter);
71 void RemoveOutliers(
double nsig);
74 double GetChi2()
const;
83 int GetNPar()
const {
return npar_; }
86 static bool Value(
MeasuredStar& m, Vect
const& pars,
double& value,
int deg);
89 void DumpNTuples(std::string
const& output_dir)
const;
92 void DumpParNTuple(std::string
const& ntname)
const;
95 void DumpMeasuredStarNTuple(std::string
const& ntname)
const;
98 void DumpFittedStarNTuple(std::string
const& ntname)
const;
103 CcdImageList& imstd::list_;
110 mutable double chi2_;
113 mutable bool cleanChi2_;
115 void update_star_fluxes_();
116 void update_calib_pars_();
122 void SmoothModelFitter::LoopOnMeasurements(Op& op)
const
124 CcdImageIterator imI;
125 MeasuredStarIterator stI;
127 for(imI=imstd::list_.begin();imI!=imstd::list_.end();imI++)
131 for(stI=catalog.begin();stI!=catalog.end();stI++)
A list of FittedStar s. Such a list is typically constructed by Associations.
Definition: fittedstar.h:158
The class that implements the relations between MeasuredStar and FittedStar.
Definition: associations.h:17
handler of an actual image from a single CCD
Definition: ccdimage.h:21
The objects which have been measured several times. The MeasuredStar s measuring the same object in d...
Definition: fittedstar.h:37
bool IsValid() const
Fits may use that to discard outliers.
Definition: measuredstar.h:83
objects measured on actual images. Coordinates and uncertainties are expressed in pixel image frame...
Definition: measuredstar.h:21
A list of MeasuredStar. They are usually filled in Associations::AddImage.
Definition: measuredstar.h:105