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-7180: Port HSC Aperture Correction Fix #43

Merged
merged 3 commits into from Aug 11, 2016
Merged

Conversation

timj
Copy link
Member

@timj timj commented Aug 11, 2016

No description provided.


self.log.info("Measuring aperture corrections for %d flux fields" % (len(self.toCorrect),))
# First, create a subset of the catalog that contains only selected stars
# with non-flagged reference fluxes.
subset1 = [record for record in self.starSelector.selectStars(exposure, catalog).starCat
if not record.get(self.refFluxKeys.flag)]
if not record.get(self.refFluxKeys.flag) and
numpy.isfinite(record.get(self.refFluxKeys.flux))]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent a bit here so that it's obvious that it's not a new statement. The if aligned with the numpy confuses a quick scan of the code.

A single NAN in the inputs can produce all-NAN outputs, so be
careful to get them all.
Zero flux in the measurement being corrected will cause a
ZeroDivisionError which can bring everything down, so we
need to catch this case.
@PaulPrice PaulPrice merged commit 40e6f29 into master Aug 11, 2016
@ktlim ktlim deleted the tickets/DM-7180 branch August 25, 2018 06:50
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