An algorithm that fits a 2-component shapelet approximation to the PSF model.
More...
|
| DoubleShapeletPsfApproxAlgorithm (Control const &ctrl, std::string const &name, afw::table::Schema &schema) |
| Failure modes passed by MeasurementErrors thrown by this class. More...
|
|
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. More...
|
|
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. More...
|
|
|
static
base::FlagDefinitionList const & | getFlagDefinitions () |
|
static
shapelet::MultiShapeletFunction | initializeResult (Control const &ctrl) |
| Create a MultiShapeletFunction with orders and radii and amplitude ratios from the control object. More...
|
|
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. More...
|
|
static boost::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. More...
|
|
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. More...
|
|
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. More...
|
|
An algorithm that fits a 2-component shapelet approximation to the PSF model.
This algorithm fits a similar model to the one that has been used on the HSC side for several data releases, but uses the improved optimizer in meas_modelfit instead of the one in (the now defunct) meas_extensions_multiShapelet and using moments to reduce the number of parameters in the fit. It is faster and more robust than GeneralShapeletPsfApprox, but much less flexible.
The model is not a fully general one, even for two shapelet components. We tie the ellipticities of the two components together, hold the center fixed, and keep their radii fixed at a value set in the configuration; this means we fit only one set of ellipse parameters, instead of two.
Definition at line 95 of file DoubleShapeletPsfApprox.h.
static void lsst::meas::modelfit::DoubleShapeletPsfApproxAlgorithm::fitMoments |
( |
shapelet::MultiShapeletFunction & |
result, |
|
|
Control const & |
ctrl, |
|
|
afw::image::Image< Scalar > const & |
psfImage |
|
) |
| |
|
static |
Update a MultiShapeletFunction's ellipses to match the first and second moments of a PSF image.
The relative ampltidues, radii, and ellipticities of the ellipses will not be modified; both ellipses will simply be transformed (together) such that the moments of the MultiShapeletFunction match the (unweighted) moments of the image, and the two components will be scaled together to match the total flux in the image.
- Parameters
-
[in,out] | result | MultiShapeletFunction to update. Must have unit circle moments. Probably the result of a call to initializeResult(). |
[in] | ctrl | Control object specifying the details of the model and how to fit it. |
[in] | psfImage | Image of the PSF to fit. Should have xy0 set such that (0,0) is at the center of the image. Probably the result of a call to Psf::computeKernelImage(). |
- Exceptions
-
meas::base::MeasurementError | if the resulting moments are invalid, either because they have negative determinant or the radii are out of bounds. |
static boost::shared_ptr< OptimizerObjective > lsst::meas::modelfit::DoubleShapeletPsfApproxAlgorithm::makeObjective |
( |
afw::geom::ellipses::Ellipse const & |
moments, |
|
|
Control const & |
ctrl, |
|
|
afw::image::Image< Scalar > const & |
psfImage |
|
) |
| |
|
static |
Return an Objective object that can be used to fit the profile of the model.
By "profile" we mean the two radii and two zeroth-order amplitudes, which we fit in fitProfile() while holding all other parameters fixed.
This function is probably not useful to most users, who should just call fitProfile instead; it's public mostly to make it easier to test functionality internal to fitProfile().
The parameters expected by the Objective are:
- The zeroth-order amplitude of the inner component.
- The zeroth-order amplitude of the outer component.
- The determinant radius of the inner component relative to the determinant radius of the moments ellipse.
- The determinant radius of the outer component relative to the determinant radius of the moments ellipse.
- Parameters
-
[in] | moments | Ellipse computed from the moments of the MultiShapeletFunction to be fit. |
[in] | ctrl | Control object specifying the details of the model and how to fit it. |
[in] | psfImage | Image of the PSF to fit. Should have xy0 set such that (0,0) is at the center of the image. Probably the result of a call to Psf::computeKernelImage(). |