Skip to content

Commit

Permalink
post review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Jan 9, 2018
1 parent 2bcf206 commit ea05420
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 2 additions & 12 deletions include/lsst/jointcal/Associations.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,12 @@ class Associations {
/**
* @brief return the number of CcdImages with non-empty catalogs to-be-fit.
*/
int nCcdImagesValidForFit() const {
return std::count_if(
ccdImageList.begin(), ccdImageList.end(),
[](std::shared_ptr<CcdImage> const &item) { return item->getCatalogForFit().size() > 0; });
}
int nCcdImagesValidForFit() const;

/**
* @brief Return the number of fittedStars that have an associated refStar.
*/
size_t nFittedStarsWithAssociatedRefStar() {
size_t count = 0;
for (auto const &fittedStar : fittedStarList) {
if ((fittedStar != nullptr) & (fittedStar->getRefStar() != nullptr)) count++;
}
return count;
}
size_t nFittedStarsWithAssociatedRefStar() const;

private:
void associateRefStars(double matchCutInArcsec, const Gtransfo *gtransfo);
Expand Down
16 changes: 15 additions & 1 deletion src/Associations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,20 @@ void Associations::deprojectFittedStars() {
fittedStarList.inTangentPlaneCoordinates = false;
}

int Associations::nCcdImagesValidForFit() const {
return std::count_if(ccdImageList.begin(), ccdImageList.end(), [](std::shared_ptr<CcdImage> const &item) {
return item->getCatalogForFit().size() > 0;
});
}

size_t Associations::nFittedStarsWithAssociatedRefStar() const {
size_t count = 0;
for (auto const &fittedStar : fittedStarList) {
if ((fittedStar != nullptr) & (fittedStar->getRefStar() != nullptr)) count++;
}
return count;
}

#ifdef TODO
void Associations::collectMCStars(int realization) {
CcdImageIterator I;
Expand Down Expand Up @@ -417,6 +431,6 @@ void Associations::setFittedStarColors(std::string dicStarListName, std::string
}
}

#endif /* STORAGE */
#endif /* TODO */
} // namespace jointcal
} // namespace lsst

0 comments on commit ea05420

Please sign in to comment.