lsst.meas.modelfit  13.0-10-g4e34388+12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Pages
Public Member Functions | List of all members
lsst::meas::modelfit::UnitTransformedLikelihood Class Reference

A concrete Likelihood class that does not require its parameters and data to be in the same UnitSystem. More...

#include <UnitTransformedLikelihood.h>

Inheritance diagram for lsst::meas::modelfit::UnitTransformedLikelihood:
lsst::meas::modelfit::Likelihood

Public Member Functions

void computeModelMatrix (ndarray::Array< Pixel, 2,-1 > const &modelMatrix, ndarray::Array< Scalar const, 1, 1 > const &nonlinear, bool doApplyWeights=true) const override
 Evaluate the model for the given vector of nonlinear parameters. More...
 
 UnitTransformedLikelihood (boost::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed, UnitSystem const &fitSys, afw::coord::Coord const &position, std::vector< boost::shared_ptr< EpochFootprint >> const &epochFootprintList, UnitTransformedLikelihoodControl const &ctrl)
 Initialize a UnitTransformedLikelihood with data from multiple exposures. More...
 
 UnitTransformedLikelihood (boost::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed, UnitSystem const &fitSys, afw::coord::Coord const &position, afw::image::Exposure< Pixel > const &exposure, afw::detection::Footprint const &footprint, shapelet::MultiShapeletFunction const &psf, UnitTransformedLikelihoodControl const &ctrl)
 Initialize a UnitTransformedLikelihood with data from multiple exposures. More...
 
virtual ~UnitTransformedLikelihood ()
 
- Public Member Functions inherited from lsst::meas::modelfit::Likelihood
int getDataDim () const
 Return the number of data points. More...
 
int getAmplitudeDim () const
 Return the number of linear parameters (columns of the model matrix) More...
 
int getNonlinearDim () const
 Return the number of nonlinear parameters (which parameterize the model matrix) More...
 
int getFixedDim () const
 Return the number of fixed nonlinear parameters (set on Likelihood construction) More...
 
ndarray::Array< Scalar const, 1, 1 > getFixed () const
 Return the vector of fixed nonlinear parameters. More...
 
ndarray::Array< Pixel const, 1, 1 > getData () const
 Return the vector of weighted, scaled data points \(z\). More...
 
ndarray::Array< Pixel const, 1, 1 > getUnweightedData () const
 Return the vector of unweighted data points \(y\). More...
 
ndarray::Array< Pixel const, 1, 1 > getWeights () const
 Return the vector of weights \(w\) applied to data points and model matrix rows. More...
 
ndarray::Array< Pixel const, 1, 1 > getVariance () const
 Return the vector of per-data-point variances. More...
 
boost::shared_ptr< ModelgetModel () const
 Return an object that defines the model and its parameters. More...
 
virtual ~Likelihood ()
 
 Likelihood (const Likelihood &)=delete
 
Likelihoodoperator= (const Likelihood &)=delete
 
 Likelihood (Likelihood &&)=delete
 
Likelihoodoperator= (Likelihood &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from lsst::meas::modelfit::Likelihood
 Likelihood (boost::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed)
 
- Protected Attributes inherited from lsst::meas::modelfit::Likelihood
boost::shared_ptr< Model_model
 
ndarray::Array< Scalar const, 1, 1 > _fixed
 
ndarray::Array< Pixel, 1, 1 > _data
 
ndarray::Array< Pixel, 1, 1 > _unweightedData
 
ndarray::Array< Pixel, 1, 1 > _variance
 
ndarray::Array< Pixel, 1, 1 > _weights
 

Detailed Description

A concrete Likelihood class that does not require its parameters and data to be in the same UnitSystem.

This is the main concrete Likelihood class using when fitting sources, even in the case where the measurement UnitSystem is the same as that of the data; we always prefer to fit in a special UnitSystem (see Units and Coordinate Systems), using this class to transform the model realization when comparing to the data. This makes forced photometry and modelfit measurements just as easy as single-frame measurements (aside from data access); one can simply initialize a UnitTransformedLikelihood with multiple exposures instead of a single exposure to fit simultaneously to multiple exposures.

Definition at line 101 of file UnitTransformedLikelihood.h.

Constructor & Destructor Documentation

lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood ( boost::shared_ptr< Model model,
ndarray::Array< Scalar const, 1, 1 > const &  fixed,
UnitSystem const &  fitSys,
afw::coord::Coord const &  position,
std::vector< boost::shared_ptr< EpochFootprint >> const &  epochFootprintList,
UnitTransformedLikelihoodControl const &  ctrl 
)
explicit

Initialize a UnitTransformedLikelihood with data from multiple exposures.

Parameters
[in]modelObject that defines the model to fit and its parameters.
[in]fixedModel parameters that are held fixed.
[in]fitSysGeometric and photometric system to fit in
[in]positionSky position of object being fit
[in]epochFootprintListList of shared pointers to EpochFootprint
[in]ctrlControl object with various options
lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood ( boost::shared_ptr< Model model,
ndarray::Array< Scalar const, 1, 1 > const &  fixed,
UnitSystem const &  fitSys,
afw::coord::Coord const &  position,
afw::image::Exposure< Pixel > const &  exposure,
afw::detection::Footprint const &  footprint,
shapelet::MultiShapeletFunction const &  psf,
UnitTransformedLikelihoodControl const &  ctrl 
)
explicit

Initialize a UnitTransformedLikelihood with data from multiple exposures.

Parameters
[in]modelObject that defines the model to fit and its parameters.
[in]fixedModel parameters that are held fixed.
[in]fitSysGeometric and photometric system to fit in
[in]positionSky position of object being fit
[in]exposureExposure containing the data to fit
[in]footprintFootprint that defines the pixels to include in the fit
[in]psfShapelet approximation to the PSF
[in]ctrlControl object with various options
virtual lsst::meas::modelfit::UnitTransformedLikelihood::~UnitTransformedLikelihood ( )
virtual

Member Function Documentation

void lsst::meas::modelfit::UnitTransformedLikelihood::computeModelMatrix ( ndarray::Array< Pixel, 2,-1 > const &  modelMatrix,
ndarray::Array< Scalar const, 1, 1 > const &  nonlinear,
bool  doApplyWeights = true 
) const
overridevirtual

Evaluate the model for the given vector of nonlinear parameters.

Parameters
[out]modelMatrixThe dataDim x amplitudeDim matrix \(B\) that expresses the model projected in such a way that it can be compared to the data when multiplied by an amplitude vector \(\alpha\). It should be weighted if the data vector is. The caller is responsible for guaranteeing that the shape of the matrix correct, but implementations should not assume anything about the initial values of the matrix elements.
[in]nonlinearVector of nonlinear parameters at which to evaluate the model.
[in]doApplyWeightsIf False, do not apply the weights to the modelMatrix.

Implements lsst::meas::modelfit::Likelihood.


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