LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
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;
237 #endif // !LSST_MEAS_EXTENSIONS_PHOTOMETRY_KRON_H
double getX() const
Accessors.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
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
Record class that contains measurements made on a single exposure.
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
Exception to be thrown when a measurement algorithm experiences a known failure mode.
C++ control object for Kron flux.
Defines the fields and offsets for a table.
double nSigmaForRadius
"Multiplier of rms size for aperture used to initially estimate the Kron radius" ;
An ellipse core for the semimajor/semiminor axis and position angle parametrization (a,...
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
Point< double, 2 > Point2D
KronFluxControl Control
A typedef to the Control object for this algorithm, defined above.
A FunctorKey for FluxResult.
static meas::base::FlagDefinition const USED_PSF_RADIUS
KronAperture(afw::table::SourceRecord const &source, float radiusForRadius=std::nanf(""))
vector-type utility class to build a collection of FlagDefinitions
const char * source()
Source function that allows astChannel to source from a Stream.
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.
A base class for parametrizations of the "core" of an ellipse - the ellipticity and size.
double nRadiusForFlux
"Number of Kron radii for Kron flux" ;
Utility class for handling flag fields that indicate the failure modes of an algorithm.
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
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
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 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
A base class for image defects.
bool enforceMinimumRadius
"If true check that the Kron radius exceeds some minimum" ;
static meas::base::FlagDefinition const FAILURE
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
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" ;
Class for storing generic metadata.
static meas::base::FlagDefinitionList const & getFlagDefinitions()
Provides consistent interface for LSST exceptions.
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
Handle an exception thrown by the current algorithm by setting flags in the given record.
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
Called to measure a single child source in an image.
static meas::base::FlagDefinition const USED_MINIMUM_RADIUS
double smoothingSigma
"Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K" ;