23 #ifndef LSST_AFW_IMAGE_PHOTOCALIB_H 24 #define LSST_AFW_IMAGE_PHOTOCALIB_H 106 : _calibrationMean(calibrationMean), _calibrationErr(
calibrationErr), _isConstant(true) {
107 ndarray::Array<double, 2, 2> coeffs = ndarray::allocate(ndarray::makeVector(1, 1));
109 _calibration = std::make_shared<afw::math::ChebyshevBoundedField>(
120 : _calibration(calibration),
121 _calibrationMean(computeCalibrationMean(calibration)),
123 _isConstant(false) {}
135 : _calibration(calibration),
136 _calibrationMean(calibrationMean),
137 _calibrationErr(calibrationErr),
138 _isConstant(isConstant) {}
153 double instFluxToMaggies(
double instFlux)
const;
166 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr,
170 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr)
const;
233 double instFluxToMagnitude(
double instFlux)
const;
246 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr,
250 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr)
const;
310 double magnitudeToInstFlux(
double magnitude)
const;
414 double _calibrationMean;
417 double _calibrationErr;
430 ndarray::Array<double, 2, 2> result)
const;
436 #endif // LSST_AFW_IMAGE_PHOTOCALIB_H table::Key< double > calibrationErr
PhotoCalib(double calibrationMean, double calibrationErr, std::shared_ptr< afw::math::BoundedField > calibration, bool isConstant)
Create a calibration with a pre-computed mean.
double getCalibrationMean() const
Get the mean photometric calibration (equal to 1 / getInstFluxMag0()).
An object passed to Persistable::write to allow it to persist itself.
The photometric calibration of an exposure.
table::Key< table::Flag > isConstant
bool operator!=(PhotoCalib const &rhs) const
Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal...
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
ItemVariant const * other
table::Key< double > calibrationMean
An integer coordinate rectangle.
A base class for objects that can be persisted via afw::table::io Archive classes.
Measurement(double value, double err)
std::ostream & operator<<(std::ostream &os, VisitInfo const &visitInfo)
A base class for image defects.
PhotoCalib(double calibrationMean, double calibrationErr=0, afw::geom::Box2I const &bbox=afw::geom::Box2I())
Create a non-spatially-varying calibration.
PhotoCalib(std::shared_ptr< afw::math::BoundedField > calibration, double calibrationErr=0)
Create a spatially-varying calibration.
PhotoCalib()
Create a empty, zeroed calibration.
std::unique_ptr< SchemaItem< U > > result
double getCalibrationErr() const
Get the mean photometric calibration error.
bool isPersistable() const
Return true if this particular object can be persisted using afw::table::io.
A BoundedField based on 2-d Chebyshev polynomials of the first kind.
Record class that contains measurements made on a single exposure.
double getInstFluxMag0() const
Get the magnitude zero point (equal to 1 / mean(calibration)).
A CRTP facade class for subclasses of Persistable.