LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lsst::meas::modelfit::GeneralPsfFitterAlgorithm Class Reference

#include <GeneralPsfFitter.h>

Inheritance diagram for lsst::meas::modelfit::GeneralPsfFitterAlgorithm:
lsst::meas::modelfit::GeneralPsfFitter

Public Types

typedef GeneralPsfFitterControl Control
 

Public Member Functions

 GeneralPsfFitterAlgorithm (GeneralPsfFitterControl const &ctrl, afw::table::Schema &schema, std::string const &prefix)
 
shapelet::MultiShapeletFunctionKey getKey ()
 
void measure (afw::table::SourceRecord &measRecord, afw::image::Image< double > const &image, shapelet::MultiShapeletFunction const &initial) const
 
void measure (afw::table::SourceRecord &measRecord, afw::image::Image< double > const &image, afw::geom::ellipses::Quadrupole const &moments) const
 
void fail (afw::table::SourceRecord &measRecord, lsst::meas::base::MeasurementError *error=nullptr) const
 
shapelet::MultiShapeletFunctionKey addFields (afw::table::Schema &schema, std::string const &prefix) const
 Add fields to a Schema that can be used to store the MultiShapeletFunction returned by apply(). More...
 
std::shared_ptr< ModelgetModel () const
 Return the Model object that corresponds to the configuration. More...
 
std::shared_ptr< PriorgetPrior () const
 Return the Prior object that corresponds to the configuration. More...
 
shapelet::MultiShapeletFunction adapt (shapelet::MultiShapeletFunction const &previousFit, std::shared_ptr< Model > previousModel) const
 Adapt a differently-configured previous fit to be used as an starting point for this GeneralPsfFitter. More...
 
shapelet::MultiShapeletFunction apply (afw::image::Image< Pixel > const &image, afw::geom::ellipses::Quadrupole const &moments, Scalar noiseSigma=-1, int *pState=nullptr) const
 Perform an initial fit to a PSF image. More...
 
shapelet::MultiShapeletFunction apply (afw::image::Image< double > const &image, afw::geom::ellipses::Quadrupole const &moments, Scalar noiseSigma=-1, int *pState=nullptr) const
 
shapelet::MultiShapeletFunction apply (afw::image::Image< Pixel > const &image, shapelet::MultiShapeletFunction const &initial, Scalar noiseSigma=-1, int *pState=nullptr) const
 Perform a fit to a PSF image, using a previous fit as a starting point. More...
 
shapelet::MultiShapeletFunction apply (afw::image::Image< double > const &image, shapelet::MultiShapeletFunction const &initial, Scalar noiseSigma=-1, int *pState=nullptr) const
 

Static Public Member Functions

static base::FlagDefinitionList const & getFlagDefinitions ()
 

Static Public Attributes

static base::FlagDefinition const FAILURE
 
static base::FlagDefinition const MAX_INNER_ITERATIONS
 
static base::FlagDefinition const MAX_OUTER_ITERATIONS
 
static base::FlagDefinition const EXCEPTION
 
static base::FlagDefinition const CONTAINS_NAN
 

Detailed Description

Definition at line 267 of file GeneralPsfFitter.h.

Member Typedef Documentation

◆ Control

Definition at line 278 of file GeneralPsfFitter.h.

Constructor & Destructor Documentation

◆ GeneralPsfFitterAlgorithm()

lsst::meas::modelfit::GeneralPsfFitterAlgorithm::GeneralPsfFitterAlgorithm ( GeneralPsfFitterControl const &  ctrl,
afw::table::Schema schema,
std::string const &  prefix 
)

Member Function Documentation

◆ adapt()

shapelet::MultiShapeletFunction lsst::meas::modelfit::GeneralPsfFitter::adapt ( shapelet::MultiShapeletFunction const &  previousFit,
std::shared_ptr< Model previousModel 
) const
inherited

Adapt a differently-configured previous fit to be used as an starting point for this GeneralPsfFitter.

Parameters
[in]previousFitThe return value of apply() from a differently-configured instance of GeneralPsfFitter.
[in]previousModelThe Model associated with the GeneralPsfFitter used to create previousFit.
Returns
a new MultiShapelet function that may be passed directly to apply(). When possible, the ellipse and shapelet coefficeints will be copied from previousFit; higher-order coefficients will be set to zero, and any components used in this but unused in the previous fit will have their ellipses set relative to the previous fit's "primary" component.

◆ addFields()

shapelet::MultiShapeletFunctionKey lsst::meas::modelfit::GeneralPsfFitter::addFields ( afw::table::Schema schema,
std::string const &  prefix 
) const
inherited

Add fields to a Schema that can be used to store the MultiShapeletFunction returned by apply().

Parameters
[in,out]schemaSchema to add fields to.
[in]prefixField name prefix for all fields.
Returns
a FunctorKey that can get/set MultiShapeletFunctions that match the configuration of this fitter on a record.

◆ apply() [1/4]

shapelet::MultiShapeletFunction lsst::meas::modelfit::GeneralPsfFitter::apply ( afw::image::Image< double > const &  image,
afw::geom::ellipses::Quadrupole const &  moments,
Scalar  noiseSigma = -1,
int *  pState = nullptr 
) const
inlineinherited

Definition at line 221 of file GeneralPsfFitter.h.

226  {
227  return apply(afw::image::Image<float>(image, true), moments, noiseSigma, pState);
228  }
shapelet::MultiShapeletFunction apply(afw::image::Image< Pixel > const &image, afw::geom::ellipses::Quadrupole const &moments, Scalar noiseSigma=-1, int *pState=nullptr) const
Perform an initial fit to a PSF image.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
VectorQ moments
Definition: simpleShape.cc:151

◆ apply() [2/4]

shapelet::MultiShapeletFunction lsst::meas::modelfit::GeneralPsfFitter::apply ( afw::image::Image< double > const &  image,
shapelet::MultiShapeletFunction const &  initial,
Scalar  noiseSigma = -1,
int *  pState = nullptr 
) const
inlineinherited

Definition at line 251 of file GeneralPsfFitter.h.

256  {
257  return apply(afw::image::Image<float>(image, true), initial, noiseSigma);
258  }

◆ apply() [3/4]

shapelet::MultiShapeletFunction lsst::meas::modelfit::GeneralPsfFitter::apply ( afw::image::Image< Pixel > const &  image,
afw::geom::ellipses::Quadrupole const &  moments,
Scalar  noiseSigma = -1,
int *  pState = nullptr 
) const
inherited

Perform an initial fit to a PSF image.

Parameters
[in]imageThe image to fit, typically the result of Psf::computeKernelImage(). The image's xy0 should be set such that the center of the PSF is at (0,0).
[in]momentsSecond moments of the PSF, typically result of Psf::computeShape() or running some other adaptive moments code on the PSF image. This will be used to set the initial ellipses of the multishapelet model.
[in]noiseSigmaAn estimate of the noise in the image. As LSST PSF images are generally assumed to be noise-free, this is really just a fiddle-factor for the user. A default value from the control object is used if this is negative.
[in]pStatePointer to an integer which is used to return the optimizerState from apply.

◆ apply() [4/4]

shapelet::MultiShapeletFunction lsst::meas::modelfit::GeneralPsfFitter::apply ( afw::image::Image< Pixel > const &  image,
shapelet::MultiShapeletFunction const &  initial,
Scalar  noiseSigma = -1,
int *  pState = nullptr 
) const
inherited

Perform a fit to a PSF image, using a previous fit as a starting point.

Parameters
[in]imageThe image to fit, typically the result of Psf::computeKernelImage(). The image's xy0 should be set such that the center of the PSF is at (0,0).
[in]initialThe result of a previous call to apply(), using an identically-configured GeneralPsfFitter instance. To use a result from a differently-configured GeneralPsfFitter, use adapt().
[in]noiseSigmaAn estimate of the noise in the image. As LSST PSF images are generally assumed to be noise-free, this is really just a fiddle-factor for the user. A default value from the control object is used if this is negative.
[in]pStatePointer to an integer which is used to return the optimizerState from apply.

◆ fail()

void lsst::meas::modelfit::GeneralPsfFitterAlgorithm::fail ( afw::table::SourceRecord measRecord,
lsst::meas::base::MeasurementError error = nullptr 
) const

◆ getFlagDefinitions()

static base::FlagDefinitionList const& lsst::meas::modelfit::GeneralPsfFitterAlgorithm::getFlagDefinitions ( )
static

◆ getKey()

shapelet::MultiShapeletFunctionKey lsst::meas::modelfit::GeneralPsfFitterAlgorithm::getKey ( )
inline

Definition at line 285 of file GeneralPsfFitter.h.

285  {
286  return _key;
287  }

◆ getModel()

std::shared_ptr<Model> lsst::meas::modelfit::GeneralPsfFitter::getModel ( ) const
inlineinherited

Return the Model object that corresponds to the configuration.

In addition to the shapelet coefficients (stored in the "amplitudes" array), this Model stores all the initial ellipse parameters in the "fixed" array, as these are used to define the center of the prior; the "nonlinear" parameters are the free-to-vary ellipse parameters minus the corresponding initial values.

Definition at line 174 of file GeneralPsfFitter.h.

174 { return _model; }

◆ getPrior()

std::shared_ptr<Prior> lsst::meas::modelfit::GeneralPsfFitter::getPrior ( ) const
inlineinherited

Return the Prior object that corresponds to the configuration.

This Prior class only supports evaluate() and evaluateDerivatives(), reflecting the fact that we only intend to use it with a Optimizer, not a Sampler.

Definition at line 182 of file GeneralPsfFitter.h.

182 { return _prior; }

◆ measure() [1/2]

void lsst::meas::modelfit::GeneralPsfFitterAlgorithm::measure ( afw::table::SourceRecord measRecord,
afw::image::Image< double > const &  image,
afw::geom::ellipses::Quadrupole const &  moments 
) const

◆ measure() [2/2]

void lsst::meas::modelfit::GeneralPsfFitterAlgorithm::measure ( afw::table::SourceRecord measRecord,
afw::image::Image< double > const &  image,
shapelet::MultiShapeletFunction const &  initial 
) const

Member Data Documentation

◆ CONTAINS_NAN

base::FlagDefinition const lsst::meas::modelfit::GeneralPsfFitterAlgorithm::CONTAINS_NAN
static

Definition at line 276 of file GeneralPsfFitter.h.

◆ EXCEPTION

base::FlagDefinition const lsst::meas::modelfit::GeneralPsfFitterAlgorithm::EXCEPTION
static

Definition at line 275 of file GeneralPsfFitter.h.

◆ FAILURE

base::FlagDefinition const lsst::meas::modelfit::GeneralPsfFitterAlgorithm::FAILURE
static

Definition at line 272 of file GeneralPsfFitter.h.

◆ MAX_INNER_ITERATIONS

base::FlagDefinition const lsst::meas::modelfit::GeneralPsfFitterAlgorithm::MAX_INNER_ITERATIONS
static

Definition at line 273 of file GeneralPsfFitter.h.

◆ MAX_OUTER_ITERATIONS

base::FlagDefinition const lsst::meas::modelfit::GeneralPsfFitterAlgorithm::MAX_OUTER_ITERATIONS
static

Definition at line 274 of file GeneralPsfFitter.h.


The documentation for this class was generated from the following file: