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

Set magnitude zero point if none exists #18

Merged
merged 2 commits into from May 10, 2016
Merged

Set magnitude zero point if none exists #18

merged 2 commits into from May 10, 2016

Conversation

TallJimbo
Copy link
Member

This code will now check that calib objects have a valid fluxMag0
(zero-point) set. If not a default calib object is used with a
reference zero-point of 27.

@@ -24,6 +24,8 @@
#ifndef LSST_MEAS_MODELFIT_UnitSystem_h_INCLUDED
#define LSST_MEAS_MODELFIT_UnitSystem_h_INCLUDED

#include <math.h>
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 move this to UnitSystem.cc, and change it to #include <cmath>. The C standard libraries can be used directly from C++, but the C++ wrappers that remove the ".h" and prepend the "c" are preferred. It's not guaranteed that the stuff you include will be in std:: without that.

@TallJimbo
Copy link
Member Author

Please add a unit test. Just adding one test method to the existing test case testCModel.py (in which you modify the Calib in self.exposure to set fluxMag0=0) should be pretty easy.

This code will now check that calib objects have a valid fluxMag0
(zero-point) set. If not a default calib object is used with a
reference zero-point of 27.
@natelust natelust merged commit 07ddfdc into master May 10, 2016
@ktlim ktlim deleted the tickets/DM-3957 branch August 25, 2018 05:49
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