45 geom::Point2D const center = _centroidExtractor(measRecord, _flagHandler);
46 double const radius = exposure.
getPsf()->computeShape(center).getDeterminantRadius();
48 double const size = _ctrl.
scale * fwhm;
58 measRecord.
set(_instFluxResultKey, result);
78 mapper.getInputSchema().find<afw::table::Flag>(
name +
"_" + flagName).key;
table::Key< std::string > name
MaskedImageT getMaskedImage()
std::shared_ptr< lsst::afw::detection::Psf const > getPsf() const
void set(Key< T > const &key, U const &value)
bool isValid() const noexcept
static FlagDefinitionList const & getFlagDefinitions()
static Result computeSincFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry.
Configuration object for multiple-aperture flux algorithms.
std::string shiftKernel
"Warping kernel used to shift Sinc photometry coefficients to different center positions" ;
std::size_t size() const
return the current size (number of defined elements) of the collection
void handleFailure(afw::table::BaseRecord &record, MeasurementError const *error=nullptr) const
Handle an expected or unexpected Exception thrown by a measurement algorithm.
static FlagHandler addFields(afw::table::Schema &schema, std::string const &prefix, FlagDefinitionList const &flagDefs, FlagDefinitionList const &exclDefs=FlagDefinitionList::getEmptyList())
Add Flag fields to a schema, creating a FlagHandler object to manage them.
void setValue(afw::table::BaseRecord &record, std::size_t i, bool value) const
Set the flag field corresponding to the given flag index.
A FunctorKey for FluxResult.
Exception to be thrown when a measurement algorithm experiences a known failure mode.
ScaledApertureFluxAlgorithm(Control const &control, std::string const &name, afw::table::Schema &schema)
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const override
Measure the scaled aperture instFlux on the given image.
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const override
Handle an exception thrown by the current algorithm by setting flags in the given record.
std::string shiftKernel
"Warping kernel used to shift Sinc photometry coefficients to different center positions" ;
double scale
"Scaling factor of PSF FWHM for aperture radius." ;
A Result struct for running an aperture flux algorithm with a single radius.
bool getFlag(unsigned int index) const
Return the flag value associated with the given bit.
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...