File photometryKron.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace meas
namespace extensions
namespace photometryKron
class KronAperture

Public Functions

KronAperture(geom::Point2D const &center, afw::geom::ellipses::BaseCore const &core, float radiusForRadius = std::nanf(""))
KronAperture(afw::table::SourceRecord const &source, float radiusForRadius = std::nanf(""))
KronAperture(afw::table::SourceRecord const &reference, geom::AffineTransform const &refToMeas, double radius, float radiusForRadius = std::nanf(""))
double getX() const

Accessors.

double getY() const
float getRadiusForRadius() const
geom::Point2D const &getCenter() const
afw::geom::ellipses::Axes &getAxes()
afw::geom::ellipses::Axes const &getAxes() const
template<typename ImageT>
std::pair<double, double> measureFlux(ImageT const &image, double const nRadiusForFlux, double const maxSincRadius) const

Photometer within the Kron Aperture on an image.

Parameters
  • image: Image to measure

  • nRadiusForFlux: Kron radius multiplier

  • maxSincRadius: largest radius that we use sinc apertyres

Public Members

afw::geom::ellipses::Axes axes

< Image to measure

Shape of aperture

afw::geom::ellipses::Axes geom::Point2D const& lsst::meas::extensions::photometryKron::KronAperture::center

Centre of source.

afw::geom::ellipses::Axes geom::Point2D const KronFluxControl const& lsst::meas::extensions::photometryKron::KronAperture::ctrl

< control the algorithm

Public Static Functions

template<typename ImageT>
static PTR(KronAperture) const &

Determine the Kron Aperture from an image

Determines the object Kron aperture, using the shape from source.getShape() (e.g. SDSS’s adaptive moments)

Private Members

geom::Point2D const _center

Transform a Kron Aperture to a different frame.

afw::geom::ellipses::Axes _axes
float _radiusForRadius
class KronFluxAlgorithm : public lsst::meas::base::SimpleAlgorithm
#include <photometryKron.h>

A measurement algorithm that estimates flux using Kron photometry.

Public Types

typedef KronFluxControl Control

A typedef to the Control object for this algorithm, defined above. The control object contains the configuration parameters for this algorithm.

Public Functions

KronFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, daf::base::PropertySet &metadata)
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure<float> const &exposure) const

Called to measure a single child source in an image.

Before this method is called, all neighbors will be replaced with noise, using the outputs of the deblender. Outputs should be saved in the given SourceRecord, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.

virtual void measureForced(afw::table::SourceRecord &measRecord, afw::image::Exposure<float> const &exposure, afw::table::SourceRecord const &refRecord, afw::geom::SkyWcs const &refWcs) const

Called to measure a single child source in an image.

Before this method is called, all neighbors will be replaced with noise, using the outputs of the deblender. Outputs should be saved in the given SourceRecord, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.

virtual void fail(afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error = NULL) const

Handle an exception thrown by the current algorithm by setting flags in the given record.

fail() is called by the measurement framework when an exception is allowed to propagate out of one the algorithm’s measure() methods. It should generally set both a general failure flag for the algorithm as well as a specific flag indicating the error condition, if possible. To aid in this, if the exception was an instance of MeasurementError, it will be passed in, carrying information about what flag to set.

An algorithm can also to chose to set flags within its own measure() methods, and then just return, rather than throw an exception. However, fail() should be implemented even when all known failure modes do not throw exceptions, to ensure that unexpected exceptions thrown in lower-level code are properly handled.

Public Static Functions

static meas::base::FlagDefinitionList const &getFlagDefinitions()

Public Static Attributes

meas::base::FlagDefinition const FAILURE
meas::base::FlagDefinition const EDGE
meas::base::FlagDefinition const BAD_SHAPE_NO_PSF
meas::base::FlagDefinition const NO_MINIMUM_RADIUS
meas::base::FlagDefinition const NO_FALLBACK_RADIUS
meas::base::FlagDefinition const BAD_RADIUS
meas::base::FlagDefinition const USED_MINIMUM_RADIUS
meas::base::FlagDefinition const USED_PSF_RADIUS
meas::base::FlagDefinition const SMALL_RADIUS
meas::base::FlagDefinition const BAD_SHAPE

Private Functions

void _applyAperture(afw::table::SourceRecord &source, afw::image::Exposure<float> const &exposure, KronAperture const &aperture) const
void _applyForced(afw::table::SourceRecord &source, afw::image::Exposure<float> const &exposure, geom::Point2D const &center, afw::table::SourceRecord const &reference, geom::AffineTransform const &refToMeas) const

Private Members

PTR (KronAperture) _fallbackRadius(afw std::string lsst::meas::extensions::photometryKron::KronFluxAlgorithm::_name
Control _ctrl
meas::base::FluxResultKey _fluxResultKey
afw::table::Key<float> _radiusKey
afw::table::Key<float> _radiusForRadiusKey
afw::table::Key<float> _psfRadiusKey
meas::base::FlagHandler _flagHandler
meas::base::SafeCentroidExtractor _centroidExtractor
class KronFluxControl
#include <photometryKron.h>

C++ control object for Kron flux.

See

KronFluxConfig.

Public Functions

lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(fixed, bool, "if true, use existing shape and centroid measurements instead of fitting")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(nSigmaForRadius, double, "Multiplier of rms size for aperture used to initially estimate the Kron radius")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(nIterForRadius, int, "Number of times to iterate when setting the Kron radius")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(nRadiusForFlux, double, "Number of Kron radii for Kron flux")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(maxSincRadius, double, "Largest aperture for which to use the slow, accurate, sinc aperture code")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(minimumRadius, double, "Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. " "Also functions as fallback aperture radius if set.")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(enforceMinimumRadius, bool, "If true check that the Kron radius exceeds some minimum")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(useFootprintRadius, bool, "Use the Footprint size as part of initial estimate of Kron radius")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(smoothingSigma, double, "Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K")
lsst::meas::extensions::photometryKron::KronFluxControl::LSST_CONTROL_FIELD(refRadiusName, std::string, "Name of field specifying reference Kron radius for forced measurement")
KronFluxControl()