23 #ifndef LSST_AFW_IMAGE_PHOTOCALIB_H 24 #define LSST_AFW_IMAGE_PHOTOCALIB_H 105 : _instFluxMag0(instFluxMag0), _instFluxMag0Err(
instFluxMag0Err), _isConstant(true) {
106 ndarray::Array<double, 2, 2> coeffs = ndarray::allocate(ndarray::makeVector(1, 1));
108 _zeroPoint = std::make_shared<afw::math::ChebyshevBoundedField>(
119 : _zeroPoint(zeroPoint),
120 _instFluxMag0(computeInstFluxMag0(zeroPoint)),
122 _isConstant(false) {}
133 std::shared_ptr<afw::math::BoundedField> zeroPoint,
bool isConstant)
134 : _zeroPoint(zeroPoint),
135 _instFluxMag0(instFluxMag0),
136 _instFluxMag0Err(instFluxMag0Err),
137 _isConstant(isConstant) {}
152 double instFluxToMaggies(
double instFlux)
const;
165 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr,
169 Measurement instFluxToMaggies(
double instFlux,
double instFluxErr)
const;
184 std::string
const &instFluxField)
const;
199 std::string
const &instFluxField)
const;
217 std::string
const &outField)
const;
232 double instFluxToMagnitude(
double instFlux)
const;
245 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr,
249 Measurement instFluxToMagnitude(
double instFlux,
double instFluxErr)
const;
264 std::string
const &instFluxField)
const;
279 std::string
const &instFluxField)
const;
298 std::string
const &outField)
const;
307 double magnitudeToInstFlux(
double magnitude)
const;
343 std::shared_ptr<afw::math::BoundedField> computeScaledZeroPoint()
const;
364 std::shared_ptr<afw::math::BoundedField> computeScalingTo(std::shared_ptr<PhotoCalib> other)
const;
377 virtual std::string getPersistenceName()
const;
382 std::shared_ptr<afw::math::BoundedField> _zeroPoint;
387 double _instFluxMag0;
390 double _instFluxMag0Err;
396 double computeInstFluxMag0(std::shared_ptr<afw::math::BoundedField> zeroPoint)
const;
400 std::string
const &instFluxField, ndarray::Array<double, 2, 2> result)
const;
402 std::string
const &instFluxField,
403 ndarray::Array<double, 2, 2> result)
const;
409 #endif // LSST_AFW_IMAGE_PHOTOCALIB_H
double getInstFluxMag0Err() const
Get the mean instFlux/magnitude zero point error.
An object passed to Persistable::write to allow it to persist itself.
PhotoCalib(double instFluxMag0, double instFluxMag0Err, std::shared_ptr< afw::math::BoundedField > zeroPoint, bool isConstant)
Create a calibration with a pre-computed mean.
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 instFluxMag0Err are equal...
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
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()
Create a empty, zeroed calibration.
PhotoCalib(double instFluxMag0, double instFluxMag0Err=0, afw::geom::Box2I const &bbox=afw::geom::Box2I())
Create a non-spatially-varying calibration.
PhotoCalib(std::shared_ptr< afw::math::BoundedField > zeroPoint, double instFluxMag0Err=0)
Create a spatially-varying calibration.
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.
table::Key< double > instFluxMag0Err
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 mean instFlux/magnitude zero point.
A CRTP facade class for subclasses of Persistable.
table::Key< double > instFluxMag0