23 #ifndef LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H 24 #define LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H 38 namespace lsst {
namespace meas {
namespace extensions {
namespace photometryKron {
51 "if true, use existing shape and centroid measurements instead of fitting");
53 "Multiplier of rms size for aperture used to initially estimate the Kron radius");
57 "Largest aperture for which to use the slow, accurate, sinc aperture code");
59 "Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. " 60 "Also functions as fallback aperture radius if set.");
63 "Use the Footprint size as part of initial estimate of Kron radius");
65 "Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K");
67 "Name of field specifying reference Kron radius for forced measurement");
107 Control
const & ctrl,
118 virtual void measureForced(
165 _radiusForRadius(radiusForRadius)
169 _center(
afw::geom::
Point2D(source.getX(), source.getY())),
170 _axes(source.getShape()),
171 _radiusForRadius(radiusForRadius)
175 double radius,
float radiusForRadius=
std::nanf(
"")) :
176 _center(refToMeas(reference.getCentroid())),
177 _axes(getKronAxes(reference.getShape(), refToMeas.getLinear(), radius)),
178 _radiusForRadius(radiusForRadius)
182 double getX()
const {
return _center.getX(); }
183 double getY()
const {
return _center.getY(); }
197 template<
typename ImageT>
206 template<
typename ImageT>
217 return std::make_shared<KronAperture>(center, axes);
231 float _radiusForRadius;
236 #endif // !LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H Defines the fields and offsets for a table.
static meas::base::FlagDefinition const SMALL_RADIUS
static meas::base::FlagDefinition const NO_MINIMUM_RADIUS
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
double getX() const
Accessors.
C++ control object for Kron flux.
double smoothingSigma
"Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K" ;
afw::geom::Point2D const & getCenter() const
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
double minimumRadius
"Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. " "Also functions as ...
boost::shared_ptr< KronAperture > transform(afw::geom::AffineTransform const &trans) const
Transform a Kron Aperture to a different frame.
Provides consistent interface for LSST exceptions.
bool fixed
"if true, use existing shape and centroid measurements instead of fitting" ;
Exception to be thrown when a measurement algorithm experiences a known failure mode.
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
Point< double, 2 > Point2D
static meas::base::FlagDefinition const USED_MINIMUM_RADIUS
Utility class for handling flag fields that indicate the failure modes of an algorithm.
static meas::base::FlagDefinition const USED_PSF_RADIUS
A base class for image defects.
static meas::base::FlagDefinition const NO_FALLBACK_RADIUS
static meas::base::FlagDefinition const BAD_SHAPE_NO_PSF
double nSigmaForRadius
"Multiplier of rms size for aperture used to initially estimate the Kron radius" ; ...
afw::geom::ellipses::Axes const & getAxes() const
bool enforceMinimumRadius
"If true check that the Kron radius exceeds some minimum" ;
KronFluxControl Control
A typedef to the Control object for this algorithm, defined above.
const char * source()
Source function that allows astChannel to source from a Stream.
std::string refRadiusName
"Name of field specifying reference Kron radius for forced measurement" ;
A FunctorKey for FluxResult.
KronAperture(afw::table::SourceRecord const &reference, afw::geom::AffineTransform const &refToMeas, double radius, float radiusForRadius=std::nanf(""))
float getRadiusForRadius() const
static meas::base::FlagDefinition const FAILURE
An ellipse core for the semimajor/semiminor axis and position angle parametrization (a...
double maxSincRadius
"Largest aperture for which to use the slow, accurate, sinc aperture code" ;
static meas::base::FlagDefinition const BAD_RADIUS
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
int nIterForRadius
"Number of times to iterate when setting the Kron radius" ;
A base class for parametrizations of the "core" of an ellipse - the ellipticity and size...
Class for storing generic metadata.
bool useFootprintRadius
"Use the Footprint size as part of initial estimate of Kron radius" ;
A measurement algorithm that estimates flux using Kron photometry.
static meas::base::FlagDefinition const EDGE
KronAperture(afw::geom::Point2D const ¢er, afw::geom::ellipses::BaseCore const &core, float radiusForRadius=std::nanf(""))
def measure(mi, x, y, size, statistic, stats)
Record class that contains measurements made on a single exposure.
KronAperture(afw::table::SourceRecord const &source, float radiusForRadius=std::nanf(""))
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
vector-type utility class to build a collection of FlagDefinitions
afw::geom::ellipses::Axes & getAxes()
double nRadiusForFlux
"Number of Kron radii for Kron flux" ;
static meas::base::FlagDefinition const BAD_SHAPE