New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-12310 fix NaNs in photometry and astrometry #58
Conversation
76676c8
to
bf007fe
Compare
include/lsst/jointcal/FitterBase.h
Outdated
virtual void saveResultTuples(std::string const &tupleName) const = 0; | ||
virtual void saveResultTuples(std::string const &tupleName) const; | ||
|
||
/// Produces a tuple containing residuals of measurement terms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imperative voice for Short Summary of methods: https://developer.lsst.io/docs/cpp_docs.html#short-summary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your mentioning this reminded me that I really should rename these methods. I've done so, and updated the docstrings.
const FittedStarList &fittedStarList = _associations->fittedStarList; | ||
for (auto const &fittedStar : fittedStarList) { | ||
const RefStar *refStar = fittedStar->getRefStar(); | ||
if (refStar == nullptr) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, is it rare or frequent for the refStar == nullptr? What condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any time there isn't a refStar for that fittedStar (which could be most of them).
9800ef4
to
eeb1270
Compare
Make fitter status output a configurable. Add PhotometryFit::RefContributions and rename files and methods. Use tabs to separate columns and pull column descriptors into new row for both photometry and astrometry output.
Rejecting bad refcat fluxes is selectable with rejectBadFluxes param Update decam photometry test refact numbers. Some flux=NaN or fluxErr=0 values had been sneaking in from that refcat.
963d00e
to
ebde90d
Compare
This should fix NaNs that sneak in via bad refractionAngle calculations, refcat sources with
flux=NaN or inf
orfluxErr=NaN or inf or 0
, and cause early failure if chi2 is NaN before or during the fitting process. I also made some cleanups that helped me debug this but that we'll want for the future.