LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef LSST_AFW_IMAGE_PHOTOCALIB_H
24 #define LSST_AFW_IMAGE_PHOTOCALIB_H
32 #include "boost/format.hpp"
142 ndarray::Array<double, 2, 2> coeffs = ndarray::allocate(ndarray::makeVector(1, 1));
144 _calibration = std::make_shared<afw::math::ChebyshevBoundedField>(
155 : _calibration(calibration),
156 _calibrationMean(computeCalibrationMean(calibration)),
159 assertNonNegative(_calibrationMean,
"Calibration (computed via BoundedField.mean()) mean");
173 : _calibration(calibration),
351 bool includeScaleUncertainty =
true)
const;
523 double _calibrationMean;
526 double _calibrationErr;
540 ndarray::Array<double, 1> evaluateArray(ndarray::Array<double, 1>
const &xx,
541 ndarray::Array<double, 1>
const &yy)
const;
553 ndarray::Array<double, 2, 2>
result)
const;
556 ndarray::Array<double, 2, 2>
result)
const;
591 #endif // LSST_AFW_IMAGE_PHOTOCALIB_H
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
const double referenceFlux
The Oke & Gunn (1983) AB magnitude reference flux, in nJy (often approximated as 3631....
Utilities for converting between flux and magnitude in C++.
std::shared_ptr< PhotoCalib > makePhotoCalibFromMetadata(daf::base::PropertySet &metadata, bool strip=false)
Construct a PhotoCalib from FITS FLUXMAG0/FLUXMAG0ERR keywords.
Record class that contains measurements made on a single exposure.
PhotoCalib(std::shared_ptr< afw::math::BoundedField > calibration, double calibrationErr=0)
Create a spatially-varying calibration.
PhotoCalib(PhotoCalib &&)=default
table::Key< double > calibrationErr
PhotoCalib()
Create a empty, zeroed calibration.
table::Key< double > calibrationMean
table::Key< table::Flag > isConstant
double instFluxToMagnitude(double instFlux, lsst::geom::Point< double, 2 > const &point) const
Convert instFlux in ADU to AB magnitude.
double getLocalCalibration(lsst::geom::Point< double, 2 > const &point) const
Get the local calibration at a point.
std::ostream & operator<<(std::ostream &os, Measurement const &measurement)
double getCalibrationMean() const
Get the mean photometric calibration.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
std::shared_ptr< PhotoCalib > makePhotoCalibFromCalibZeroPoint(double instFluxMag0, double instFluxMag0Err)
Construct a PhotoCalib from the deprecated Calib-style instFluxMag0/instFluxMag0Err values.
double getInstFluxAtZeroMagnitude() const
Get the magnitude zero point (the instrumental flux corresponding to 0 magnitude).
Interface supporting iteration over heterogenous containers.
afw::table::SourceCatalog calibrateCatalog(afw::table::SourceCatalog const &catalog, std::vector< std::string > const &instFluxFields) const
Return a flux calibrated catalog, with new _flux, _fluxErr, _mag, and _magErr fields.
bool operator==(PhotoCalib const &rhs) const
Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal.
PhotoCalib & operator=(PhotoCalib const &)=delete
A BoundedField based on 2-d Chebyshev polynomials of the first kind.
PhotoCalib(PhotoCalib const &)=default
std::shared_ptr< afw::math::BoundedField > computeScalingTo(std::shared_ptr< PhotoCalib > other) const
Calculates the scaling between this PhotoCalib and another PhotoCalib.
std::shared_ptr< typehandling::Storable > cloneStorable() const override
Create a new PhotoCalib that is a copy of this one.
A class to manipulate images, masks, and variance as a single object.
double instFluxToNanojansky(double instFlux, lsst::geom::Point< double, 2 > const &point) const
Convert instFlux in ADU to nJy at a point in the BoundedField.
bool isPersistable() const noexcept override
Return true if this particular object can be persisted using afw::table::io.
PhotoCalib & operator=(PhotoCalib &&)=delete
ItemVariant const * other
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
The photometric calibration of an exposure.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
std::string toString() const override
Create a string representation of this object.
PhotoCalib(double calibrationMean, double calibrationErr, std::shared_ptr< afw::math::BoundedField > calibration, bool isConstant)
Create a calibration with a pre-computed mean.
bool equals(typehandling::Storable const &other) const noexcept override
Compare this object to another Storable.
Reports invalid arguments.
bool operator!=(PhotoCalib const &rhs) const
Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal.
A CRTP facade class for subclasses of Persistable.
Class for storing generic metadata.
void assertNonNegative(double value, std::string const &name)
Raise lsst::pex::exceptions::InvalidParameterError if value is not >=0.
An integer coordinate rectangle.
PhotoCalib(double calibrationMean, double calibrationErr=0, lsst::geom::Box2I const &bbox=lsst::geom::Box2I())
Create a non-spatially-varying calibration.
Measurement(double value, double error)
std::shared_ptr< afw::math::BoundedField > computeScaledCalibration() const
Calculates the spatially-variable calibration, normalized by the mean in the valid domain.
MaskedImage< float > calibrateImage(MaskedImage< float > const &maskedImage, bool includeScaleUncertainty=true) const
Return a flux calibrated image, with pixel values in nJy.
~PhotoCalib() override=default
double getCalibrationErr() const
Get the mean photometric calibration error.
double magnitudeToInstFlux(double magnitude, lsst::geom::Point< double, 2 > const &point) const
Convert AB magnitude to instFlux (ADU).
io::OutputArchiveHandle OutputArchiveHandle
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.