24 #ifndef LSST_MEAS_BASE_ApertureFlux_h_INCLUDED
25 #define LSST_MEAS_BASE_ApertureFlux_h_INCLUDED
38 namespace lsst {
namespace meas {
namespace base {
49 radii, std::vector<double>,
50 "Radius (in pixels) of apertures."
55 "Maximum radius (in pixels) for which the sinc algorithm should be used instead of the "
56 "faster naive algorithm. For elliptical apertures, this is the minor axis radius."
61 "Warping kernel used to shift Sinc photometry coefficients to different center positions"
112 template <
typename T>
118 template <
typename T>
136 template <
typename T>
142 template <
typename T>
162 template <
typename T>
169 template <
typename T>
182 std::string
const &
name,
225 static std::array<FlagDefinition,ApertureFluxAlgorithm::N_FLAGS>
const &
getFlagDefinitions();
266 std::bitset<ApertureFluxAlgorithm::N_FLAGS>
_flags;
300 #endif // !LSST_MEAS_BASE_ApertureFlux_h_INCLUDED
Defines the fields and offsets for a table.
void setFlag(ApertureFluxAlgorithm::FlagBits bit, bool value=true)
Set the flag value associated with the given bit.
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=NULL) const
Handle an exception thrown by the current algorithm by setting flags in the given record...
table::Key< std::string > name
A custom container class for records, based on std::vector.
afw::table::Schema schema
A mapping between the keys of two Schemas, used to copy data between them.
std::vector< Keys > _keys
static std::array< FlagDefinition, ApertureFluxAlgorithm::N_FLAGS > const & getFlagDefinitions()
Return the flag definitions which apply to aperture flux measurements.
virtual void measure(afw::table::SourceRecord &record, afw::image::Exposure< float > const &exposure) const =0
Measure the configured apertures on the given image.
ApertureFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, daf::base::PropertySet &metadata)
Construct the algorithm and add its fields to the given Schema.
Implementation of the WCS standard for a any projection.
Exception to be thrown when a measurement algorithm experiences a known failure mode.
bool getFlag(ApertureFluxAlgorithm::FlagBits bit) const
Return the flag value associated with the given bit.
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
void copyResultToRecord(Result const &result, afw::table::SourceRecord &record, int index) const
Describe an exposure's calibration.
Configuration object for multiple-aperture flux algorithms.
table::Key< table::Array< Kernel::Pixel > > image
Keys(afw::table::Schema &schema, std::string const &prefix, std::string const &doc, bool isSinc)
Utility class for handling flag fields that indicate the failure modes of an algorithm.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Base class for multiple-aperture photometry algorithms.
static Result computeFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the flux (and optionally, uncertanties) within an aperture using the algorithm determined by ...
An ellipse defined by an arbitrary BaseCore and a center point.
double maxSincRadius
"Maximum radius (in pixels) for which the sinc algorithm should be used instead of the " "faster naiv...
static std::string makeFieldPrefix(std::string const &name, double radius)
Construct an appropriate prefix for table fields.
A class to manipulate images, masks, and variance as a single object.
static Result computeNaiveFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the flux (and optionally, uncertanties) within an aperture using naive photometry.
FlagHandler const & getFlagHandler(int index) const
void unsetFlag(ApertureFluxAlgorithm::FlagBits bit)
Clear (i.e. set to false) the flag associated with the given bit.
A FunctorKey for FluxResult.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
ApertureFluxControl Control
Typedef to the control object associated with this algorithm, defined above.
Class for storing generic metadata.
static Result computeSincFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the flux (and optionally, uncertanties) within an aperture using Sinc photometry.
Record class that contains measurements made on a single exposure.
std::string shiftKernel
"Warping kernel used to shift Sinc photometry coefficients to different center positions" ; ...
std::vector< double > radii
"Radius (in pixels) of apertures." ;
A class to represent a 2-dimensional array of pixels.
std::bitset< ApertureFluxAlgorithm::N_FLAGS > _flags
ApertureFluxResult Result
Result object returned by static methods.
A reusable result struct for flux measurements.
SafeCentroidExtractor _centroidExtractor
virtual ~ApertureFluxAlgorithm()
A Result struct for running an aperture flux algorithm with a single radius.