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-10156: Replace all uses of Calib with PhotoCalib #28

Merged
merged 1 commit into from Apr 5, 2019

Conversation

parejkoj
Copy link
Contributor

No description provided.

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Looks good!

md = butler.get("calexp_md", did, immediate=True)
calib = afwImage.Calib(md)
calib.setThrowOnNegativeFlux(False)
photoCalib = butler.get("calexp_photoCalib", did)
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... is this a feature you just added, or was there always a "calexp_calib" data type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There has always been a calexp_calib, we just didn't catch all of the places where we were doing get('calexp_md'); Calib(md). I think I've now caught all of them, and I better have, since for new data, that won't work to create a PhotoCalib, because it isn't stored in the metadata.

# compute magnitude
refMag = calib.getMagnitude(mRef.get('base_PsfFlux_instFlux'))
refMag = photoCalib.instFluxToMagnitude(mRef.get('base_PsfFlux_instFlux'))
Copy link
Member

Choose a reason for hiding this comment

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

Much clearer name. 👍

@parejkoj parejkoj merged commit c5e4034 into master Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants