29 #ifndef LSST_AFW_IMAGE_CALIB_H 30 #define LSST_AFW_IMAGE_CALIB_H 35 #include "ndarray_fwd.h" 49 namespace cameraGeom {
54 static double const JanskysPerABFlux = 3631.0;
61 return std::abs(fluxErr / (-0.4 * flux *
std::log(10)));
105 void setFluxMag0(
double fluxMag0,
double fluxMag0Sigma = 0.0);
120 double getFlux(
double const mag)
const;
132 ndarray::Array<double, 1> getFlux(ndarray::Array<double const, 1>
const& mag)
const;
135 ndarray::Array<double const, 1>
const& mag, ndarray::Array<double const, 1>
const& magErr)
const;
142 double getMagnitude(
double const flux)
const;
152 ndarray::Array<double, 1> getMagnitude(ndarray::Array<double const, 1>
const& flux)
const;
155 ndarray::Array<double const, 1>
const& flux,
156 ndarray::Array<double const, 1>
const& fluxErr)
const;
163 static void setThrowOnNegativeFlux(
bool raiseException);
167 static bool getThrowOnNegativeFlux();
178 (*this) *= 1.0 /
scale;
191 double _fluxMag0Sigma;
195 static bool _throwOnNegativeFlux;
211 #endif // LSST_AFW_IMAGE_CALIB_H
table::Key< double > fluxMag0Sigma
Calib & operator/=(double const scale)
An object passed to Persistable::write to allow it to persist itself.
double abMagErrFromFluxErr(double fluxErr, double flux)
Compute AB magnitude error from flux and flux error in Janskys.
double fluxErrFromABMagErr(double magErr, double mag)
Compute flux error in Janskys from AB magnitude error and AB magnitude.
def scale(algorithm, min, max=None, frame=None)
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
double abMagFromFlux(double flux)
Compute AB magnitude from flux in Janskys.
Describe an exposure's calibration.
bool isPersistable() const
Return true if this particular object can be persisted using afw::table::io.
A base class for objects that can be persisted via afw::table::io Archive classes.
double fluxFromABMag(double mag)
Compute flux in Janskys from AB magnitude.
void operator*=(ExtentBase< int, N > &lhs, double rhs)
A base class for image defects.
bool operator!=(Calib const &rhs) const
int stripCalibKeywords(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
Remove Calib-related keywords from the metadata.
table::Key< double > fluxMag0
A CRTP facade class for subclasses of Persistable.