28 static double sqr(
double x) {
return x * x; }
36 for (
auto i : *
this) {
40 double average = sum / this->size();
41 double sigma = sqrt(sum2 / this->size() - sqr(average));
42 return std::make_pair(average, sigma);
46 s <<
"chi2 per star : ";
47 for (
auto chi2 : chi2List) {
48 s << *(chi2.star) <<
" chi2: " << chi2.chi2 <<
" ; ";
std::ostream & operator<<(std::ostream &stream, const Gtransfo >ransfo)
allows 'stream << Transfo;' (by calling gtransfo.dump(stream)).
Structure to accumulate the chi2 contributions per each star (to help find outliers).
std::pair< double, double > computeAverageAndSigma()
Compute the average and std-deviation of these chisq values.