23 #ifndef LSST_AFW_IMAGE_PHOTOCALIB_H 24 #define LSST_AFW_IMAGE_PHOTOCALIB_H 104 : _calibrationMean(calibrationMean), _calibrationErr(
calibrationErr), _isConstant(true) {
105 ndarray::Array<double, 2, 2> coeffs = ndarray::allocate(ndarray::makeVector(1, 1));
107 _calibration = std::make_shared<afw::math::ChebyshevBoundedField>(
118 : _calibration(calibration),
119 _calibrationMean(computeCalibrationMean(calibration)),
121 _isConstant(false) {}
133 : _calibration(calibration),
134 _calibrationMean(calibrationMean),
135 _calibrationErr(calibrationErr),
136 _isConstant(isConstant) {}
151 double instFluxToMaggies(
double instFlux)
const;
164 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr,
168 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr)
const;
231 double instFluxToMagnitude(
double instFlux)
const;
244 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr,
248 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr)
const;
308 double magnitudeToInstFlux(
double magnitude)
const;
412 double _calibrationMean;
415 double _calibrationErr;
425 std::string const &instFluxField, ndarray::Array<double, 2, 2> result)
const;
428 ndarray::Array<double, 2, 2> result)
const;
434 #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.
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)
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.
double getCalibrationErr() const
Get the mean photometric calibration error.
std::ostream & operator<<(std::ostream &os, PhotoCalib const &photoCalib)
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.