lsst.meas.extensions.photometryKron
20.0.0+12
|
Go to the documentation of this file.
23 #ifndef LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
24 #define LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
29 #include "lsst/pex/config.h"
39 namespace lsst {
namespace meas {
namespace extensions {
namespace photometryKron {
51 LSST_CONTROL_FIELD(
fixed,
bool,
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");
55 LSST_CONTROL_FIELD(
nIterForRadius,
int,
"Number of times to iterate when setting the Kron radius");
56 LSST_CONTROL_FIELD(
nRadiusForFlux,
double,
"Number of Kron radii for Kron flux");
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)
176 double radius,
float radiusForRadius=
std::nanf(
"")) :
177 _center(refToMeas(reference.getCentroid())),
178 _axes(
getKronAxes(reference.getShape(), refToMeas.getLinear(), radius)),
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;
237 #endif // !LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
double getX() const
Accessors.
afw::geom::ellipses::Axes const & getAxes() const
double minimumRadius
"Minimum Kron radius (if == 0.0 use PSF's Kron radius) if enforceMinimumRadius. " "Also functions as ...
static meas::base::FlagDefinition const NO_FALLBACK_RADIUS
bool fixed
"if true, use existing shape and centroid measurements instead of fitting" ;
boost::shared_ptr< KronAperture > transform(geom::AffineTransform const &trans) const
Transform a Kron Aperture to a different frame.
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.
float getRadiusForRadius() const
C++ control object for Kron flux.
double nSigmaForRadius
"Multiplier of rms size for aperture used to initially estimate the Kron radius" ;
KronFluxControl Control
A typedef to the Control object for this algorithm, defined above.
static meas::base::FlagDefinition const USED_PSF_RADIUS
KronAperture(afw::table::SourceRecord const &source, float radiusForRadius=std::nanf(""))
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.
double nRadiusForFlux
"Number of Kron radii for Kron flux" ;
static meas::base::FlagDefinition const EDGE
A measurement algorithm that estimates flux using Kron photometry.
bool useFootprintRadius
"Use the Footprint size as part of initial estimate of Kron radius" ;
std::pair< double, double > measureFlux(ImageT const &image, double const nRadiusForFlux, double const maxSincRadius) const
Photometer within the Kron Aperture on an image.
static meas::base::FlagDefinition const BAD_SHAPE
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
static meas::base::FlagDefinition const SMALL_RADIUS
KronAperture(afw::table::SourceRecord const &reference, geom::AffineTransform const &refToMeas, double radius, float radiusForRadius=std::nanf(""))
static meas::base::FlagDefinition const BAD_SHAPE_NO_PSF
bool enforceMinimumRadius
"If true check that the Kron radius exceeds some minimum" ;
static meas::base::FlagDefinition const FAILURE
static meas::base::FlagDefinition const BAD_RADIUS
std::string refRadiusName
"Name of field specifying reference Kron radius for forced measurement" ;
geom::Point2D const & getCenter() const
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.
KronAperture(geom::Point2D const ¢er, afw::geom::ellipses::BaseCore const &core, float radiusForRadius=std::nanf(""))
double maxSincRadius
"Largest aperture for which to use the slow, accurate, sinc aperture code" ;
static meas::base::FlagDefinitionList const & getFlagDefinitions()
int nIterForRadius
"Number of times to iterate when setting the Kron radius" ;
virtual void fail(afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error=NULL) const
static meas::base::FlagDefinition const NO_MINIMUM_RADIUS
afw::geom::ellipses::Axes & getAxes()
virtual void measureForced(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure, afw::table::SourceRecord const &refRecord, afw::geom::SkyWcs const &refWcs) const
static meas::base::FlagDefinition const USED_MINIMUM_RADIUS
double smoothingSigma
"Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K" ;