31 #ifndef LSST_AFW_IMAGE_CALIB_H
32 #define LSST_AFW_IMAGE_CALIB_H
36 #include "boost/shared_ptr.hpp"
51 namespace cameraGeom {
56 static double const JanskysPerABFlux = 3631.0;
60 return -2.5*std::log10(flux/JanskysPerABFlux);
65 return std::abs(fluxErr/(-0.4*flux*
std::log(10)));
70 return std::pow(10.0, -0.4*mag)*JanskysPerABFlux;
84 typedef boost::shared_ptr<Calib>
Ptr;
85 typedef boost::shared_ptr<Calib const>
ConstPtr;
100 void setFluxMag0(std::pair<double, double> fluxMag0AndSigma);
103 double getFlux(
double const mag)
const;
105 std::pair<double, double>
getFlux(
double const mag,
double const magErr)
const;
116 std::pair<double, double>
getMagnitude(
double const flux,
double const fluxErr)
const;
155 #endif // LSST_AFW_IMAGE_CALIB_H
double getMagnitude(double const flux) const
A coordinate class intended to represent absolute positions.
Class for handling dates/times, including MJD, UTC, and TAI.
boost::shared_ptr< Calib const > ConstPtr
table::Key< double > fluxMag0Sigma
double abMagErrFromFluxErr(double fluxErr, double flux)
Compute AB magnitude error from flux and flux error in Janskys.
bool operator==(Calib const &rhs) const
bool isPersistable() const
Return true if this particular object can be persisted using afw::table::io.
static bool _throwOnNegativeFlux
double fluxErrFromABMagErr(double magErr, double mag)
Compute flux error in Janskys from AB magnitude error and AB magnitude.
std::pair< double, double > getFluxMag0() const
void setFluxMag0(double fluxMag0, double fluxMag0Sigma=0.0)
void setExptime(double exptime)
static void setThrowOnNegativeFlux(bool raiseException)
io::OutputArchiveHandle OutputArchiveHandle
table::Key< boost::int64_t > midTime
boost::shared_ptr< Calib > Ptr
double getFlux(double const mag) const
double getExptime() const
Forward declarations and default template parameters for ndarray.
double abMagFromFlux(double flux)
Compute AB magnitude from flux in Janskys.
table::Key< table::Array< Kernel::Pixel > > image
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.
lsst::daf::base::DateTime getMidTime() const
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
bool operator!=(Calib const &rhs) const
Interface for DateTime class.
int stripCalibKeywords(boost::shared_ptr< lsst::daf::base::PropertySet > metadata)
A multidimensional strided array.
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
Class for storing generic metadata.
table::Key< double > fluxMag0
static bool getThrowOnNegativeFlux()
A CRTP facade class for subclasses of Persistable.
lsst::daf::base::DateTime _midTime
void setMidTime(lsst::daf::base::DateTime const &midTime)