24 #ifndef LSST_MEAS_MODELFIT_DoubleShapeletPsfApprox_h_INCLUDED
25 #define LSST_MEAS_MODELFIT_DoubleShapeletPsfApprox_h_INCLUDED
33 namespace lsst {
namespace meas {
namespace modelfit {
47 LSST_CONTROL_FIELD(
innerOrder,
int,
"Shapelet order of inner expansion (0 == Gaussian)");
49 LSST_CONTROL_FIELD(
outerOrder,
int,
"Shapelet order of outer expansion (0 == Gaussian)");
51 LSST_CONTROL_FIELD(
radiusRatio,
double,
"Initial outer radius divided by inner radius");
55 "Initial outer Gaussian peak height divided by inner Gaussian peak height"
60 "Don't allow the semi-minor radius of any component to drop below this value (pixels)"
65 "Don't allow the determinant radii of the two components to differ by less than this (pixels)"
70 "Don't allow the semi-major radius of any component to go above this fraction of the PSF image width"
73 LSST_NESTED_CONTROL_FIELD(
75 "Configuration of the optimizer used by DoubleShapeletPsfsApproxAlgorithm::fitProfile()."
An algorithm that fits a 2-component shapelet approximation to the PSF model.
static base::FlagDefinition const MAX_ITERATIONS
DoubleShapeletPsfApproxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
Failure modes passed by MeasurementErrors thrown by this class.
static base::FlagDefinition const INVALID_POINT_FOR_PSF
static shapelet::MultiShapeletFunction initializeResult(Control const &ctrl)
Create a MultiShapeletFunction with orders and radii and amplitude ratios from the control object.
static std::shared_ptr< OptimizerObjective > makeObjective(afw::geom::ellipses::Ellipse const &moments, Control const &ctrl, afw::image::Image< Scalar > const &psfImage)
Return an Objective object that can be used to fit the profile of the model.
static void fitShapelets(shapelet::MultiShapeletFunction &result, Control const &ctrl, afw::image::Image< Scalar > const &psfImage)
Update a MultiShapeletFunction's higher-order shapelet terms, holding everything else fixed.
static base::FlagDefinitionList const & getFlagDefinitions()
DoubleShapeletPsfApproxControl Control
static void fitMoments(shapelet::MultiShapeletFunction &result, Control const &ctrl, afw::image::Image< Scalar > const &psfImage)
Update a MultiShapeletFunction's ellipses to match the first and second moments of a PSF image.
static base::FlagDefinition const INVALID_MOMENTS
static base::FlagDefinition const FAILURE
void fail(afw::table::SourceRecord &measRecord, lsst::meas::base::MeasurementError *error=nullptr) const
Handle failures caught by the measurement plugin system, setting failure flags as appropriate.
static void fitProfile(shapelet::MultiShapeletFunction &result, Control const &ctrl, afw::image::Image< Scalar > const &psfImage)
Update a MultiShapeletFunction's zeroth-order profile by fitting radii and amplitudes.
void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Run all fitting stages on the Psf attached to the given Exposure, saving the results in measRecord.
Control object used to configure a 2-shapelet fit to a PSF model; see DoubleShapeletPsfApproxAlgorith...
OptimizerControl optimizer
"Configuration of the optimizer used by DoubleShapeletPsfsApproxAlgorithm::fitProfile()....
int innerOrder
"Shapelet order of inner expansion (0 == Gaussian)" ;
double maxRadiusBoxFraction
"Don't allow the semi-major radius of any component to go above this fraction of the PSF image width"...
double minRadius
"Don't allow the semi-minor radius of any component to drop below this value (pixels)" ;
double radiusRatio
"Initial outer radius divided by inner radius" ;
double minRadiusDiff
"Don't allow the determinant radii of the two components to differ by less than this (pixels)" ;
DoubleShapeletPsfApproxControl()
int outerOrder
"Shapelet order of outer expansion (0 == Gaussian)" ;
double peakRatio
"Initial outer Gaussian peak height divided by inner Gaussian peak height" ;
Configuration object for Optimizer.