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
A coordinate class intended to represent absolute positions.
Class for handling dates/times, including MJD, UTC, and TAI.
table::Key< double > fluxMag0Sigma
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.
table::Key< boost::int64_t > midTime
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.
bool operator==(Calib const &rhs) const
void setExptime(double exptime)
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
static void setThrowOnNegativeFlux(bool raiseException)
double getExptime() const
std::pair< double, double > getFluxMag0() const
static bool _throwOnNegativeFlux
Interface for DateTime class.
int stripCalibKeywords(boost::shared_ptr< lsst::daf::base::PropertySet > metadata)
double getFlux(double const mag) const
A multidimensional strided array.
Class for storing generic metadata.
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
boost::shared_ptr< Calib const > ConstPtr
void setFluxMag0(double fluxMag0, double fluxMag0Sigma=0.0)
io::OutputArchiveHandle OutputArchiveHandle
static bool getThrowOnNegativeFlux()
table::Key< double > fluxMag0
bool operator!=(Calib const &rhs) const
lsst::daf::base::DateTime getMidTime() const
A CRTP facade class for subclasses of Persistable.
lsst::daf::base::DateTime _midTime
double getMagnitude(double const flux) const
bool isPersistable() const
Return true if this particular object can be persisted using afw::table::io.
boost::shared_ptr< Calib > Ptr
void setMidTime(lsst::daf::base::DateTime const &midTime)