Skip to content
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

Merged
merged 6 commits into from Nov 2, 2017
Merged

Conversation

parejkoj
Copy link
Collaborator

This should fix NaNs that sneak in via bad refractionAngle calculations, refcat sources with flux=NaN or inf or fluxErr=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.

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.
Copy link
Contributor

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

Copy link
Collaborator Author

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;
Copy link
Contributor

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?

Copy link
Collaborator Author

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).

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.
@parejkoj parejkoj merged commit ebde90d into master Nov 2, 2017
@ktlim ktlim deleted the tickets/DM-12310 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants