23 #ifndef LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
24 #define LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
39 namespace lsst {
namespace meas {
namespace extensions {
namespace photometryKron {
52 "if true, use existing shape and centroid measurements instead of fitting");
54 "Multiplier of rms size for aperture used to initially estimate the Kron radius");
58 "Largest aperture for which to use the slow, accurate, sinc aperture code");
60 "Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. "
61 "Also functions as fallback aperture radius if set.");
64 "Use the Footprint size as part of initial estimate of Kron radius");
66 "Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K");
68 "Name of field specifying reference Kron radius for forced measurement");
166 _radiusForRadius(radiusForRadius)
172 _radiusForRadius(radiusForRadius)
177 _center(refToMeas(reference.getCentroid())),
179 _radiusForRadius(radiusForRadius)
183 double getX()
const {
return _center.getX(); }
184 double getY()
const {
return _center.getY(); }
198 template<
typename ImageT>
207 template<
typename ImageT>
210 double const nRadiusForFlux,
211 double const maxSincRadius
218 return std::make_shared<KronAperture>(center, axes);
232 float _radiusForRadius;
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
An ellipse core for the semimajor/semiminor axis and position angle parametrization (a,...
A base class for parametrizations of the "core" of an ellipse - the ellipticity and size.
Defines the fields and offsets for a table.
Record class that contains measurements made on a single exposure.
Class for storing generic metadata.
vector-type utility class to build a collection of FlagDefinitions
Utility class for handling flag fields that indicate the failure modes of an algorithm.
A FunctorKey for FluxResult.
Exception to be thrown when a measurement algorithm experiences a known failure mode.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
KronAperture(afw::table::SourceRecord const &reference, geom::AffineTransform const &refToMeas, double radius, float radiusForRadius=std::nanf(""))
afw::geom::ellipses::Axes & getAxes()
KronAperture(afw::table::SourceRecord const &source, float radiusForRadius=std::nanf(""))
float getRadiusForRadius() const
afw::geom::ellipses::Axes const & getAxes() const
std::pair< double, double > measureFlux(ImageT const &image, double const nRadiusForFlux, double const maxSincRadius) const
Photometer within the Kron Aperture on an image.
static boost::shared_ptr< KronAperture > determineRadius(ImageT const &image, afw::geom::ellipses::Axes axes, geom::Point2D const ¢er, KronFluxControl const &ctrl)
Determine the Kron Aperture from an image.
double getX() const
Accessors.
KronAperture(geom::Point2D const ¢er, afw::geom::ellipses::BaseCore const &core, float radiusForRadius=std::nanf(""))
geom::Point2D const & getCenter() const
static afw::geom::ellipses::Axes getKronAxes(afw::geom::ellipses::Axes const &shape, geom::LinearTransform const &transformation, double const radius)
Determine Kron axes from a reference image.
boost::shared_ptr< KronAperture > transform(geom::AffineTransform const &trans) const
Transform a Kron Aperture to a different frame.
A measurement algorithm that estimates flux using Kron photometry.
static meas::base::FlagDefinition const BAD_RADIUS
static meas::base::FlagDefinition const USED_MINIMUM_RADIUS
static meas::base::FlagDefinition const FAILURE
static meas::base::FlagDefinition const SMALL_RADIUS
KronFluxControl Control
A typedef to the Control object for this algorithm, defined above.
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.
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Called to measure a single child source in an image.
static meas::base::FlagDefinition const BAD_SHAPE
static meas::base::FlagDefinitionList const & getFlagDefinitions()
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.
static meas::base::FlagDefinition const EDGE
static meas::base::FlagDefinition const NO_MINIMUM_RADIUS
static meas::base::FlagDefinition const NO_FALLBACK_RADIUS
KronFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, daf::base::PropertySet &metadata)
A class that knows how to calculate fluxes using the KRON photometry algorithm.
static meas::base::FlagDefinition const BAD_SHAPE_NO_PSF
static meas::base::FlagDefinition const USED_PSF_RADIUS
C++ control object for Kron flux.
double smoothingSigma
"Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K" ;
std::string refRadiusName
"Name of field specifying reference Kron radius for forced measurement" ;
int nIterForRadius
"Number of times to iterate when setting the Kron radius" ;
bool fixed
"if true, use existing shape and centroid measurements instead of fitting" ;
bool useFootprintRadius
"Use the Footprint size as part of initial estimate of Kron radius" ;
double minimumRadius
"Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. " "Also functions as ...
double maxSincRadius
"Largest aperture for which to use the slow, accurate, sinc aperture code" ;
double nRadiusForFlux
"Number of Kron radii for Kron flux" ;
bool enforceMinimumRadius
"If true check that the Kron radius exceeds some minimum" ;
double nSigmaForRadius
"Multiplier of rms size for aperture used to initially estimate the Kron radius" ;
Provides consistent interface for LSST exceptions.
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
const char * source()
Source function that allows astChannel to source from a Stream.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
Point< double, 2 > Point2D
A base class for image defects.
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...