LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+f5613e8b4f,g1470d8bcf6+190ad2ba91,g14a832a312+311607e4ab,g2079a07aa2+86d27d4dc4,g2305ad1205+a8e3196225,g295015adf3+b67ee847e5,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+a761f810f3,g487adcacf7+17c8fdbcbd,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+65b5bd823e,g5a732f18d5+53520f316c,g64a986408d+f5613e8b4f,g6c1bc301e9+51106c2951,g858d7b2824+f5613e8b4f,g8a8a8dda67+585e252eca,g99cad8db69+6729933424,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e9bba80f27,gc120e1dc64+eee469a5e5,gc28159a63d+0e5473021a,gcf0d15dbbd+a761f810f3,gdaeeff99f8+f9a426f77a,ge6526c86ff+d4c1d4bfef,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf1cff7945b+f5613e8b4f,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | 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.
 
 UnitTransformedLikelihood (std::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed, UnitSystem const &fitSys, geom::SpherePoint const &position, std::vector< std::shared_ptr< EpochFootprint > > const &epochFootprintList, UnitTransformedLikelihoodControl const &ctrl)
 Initialize a UnitTransformedLikelihood with data from multiple exposures.
 
 UnitTransformedLikelihood (std::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed, UnitSystem const &fitSys, geom::SpherePoint 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.
 
virtual ~UnitTransformedLikelihood ()
 
int getDataDim () const
 Return the number of data points.
 
int getAmplitudeDim () const
 Return the number of linear parameters (columns of the model matrix)
 
int getNonlinearDim () const
 Return the number of nonlinear parameters (which parameterize the model matrix)
 
int getFixedDim () const
 Return the number of fixed nonlinear parameters (set on Likelihood construction)
 
ndarray::Array< Scalar const, 1, 1 > getFixed () const
 Return the vector of fixed nonlinear parameters.
 
ndarray::Array< Pixel const, 1, 1 > getData () const
 Return the vector of weighted, scaled data points \(z\).
 
ndarray::Array< Pixel const, 1, 1 > getUnweightedData () const
 Return the vector of unweighted data points \(y\).
 
ndarray::Array< Pixel const, 1, 1 > getWeights () const
 Return the vector of weights \(w\) applied to data points and model matrix rows.
 
ndarray::Array< Pixel const, 1, 1 > getVariance () const
 Return the vector of per-data-point variances.
 
std::shared_ptr< ModelgetModel () const
 Return an object that defines the model and its parameters.
 

Protected Attributes

std::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 102 of file UnitTransformedLikelihood.h.

Constructor & Destructor Documentation

◆ UnitTransformedLikelihood() [1/2]

lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood ( std::shared_ptr< Model > model,
ndarray::Array< Scalar const, 1, 1 > const & fixed,
UnitSystem const & fitSys,
geom::SpherePoint const & position,
std::vector< std::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]positionICRS sky position of object being fit
[in]epochFootprintListList of shared pointers to EpochFootprint
[in]ctrlControl object with various options

◆ UnitTransformedLikelihood() [2/2]

lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood ( std::shared_ptr< Model > model,
ndarray::Array< Scalar const, 1, 1 > const & fixed,
UnitSystem const & fitSys,
geom::SpherePoint 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]positionICRS sky 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

◆ ~UnitTransformedLikelihood()

virtual lsst::meas::modelfit::UnitTransformedLikelihood::~UnitTransformedLikelihood ( )
virtual

Member Function Documentation

◆ computeModelMatrix()

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.

◆ getAmplitudeDim()

int lsst::meas::modelfit::Likelihood::getAmplitudeDim ( ) const
inlineinherited

Return the number of linear parameters (columns of the model matrix)

Definition at line 77 of file Likelihood.h.

77{ return _model->getAmplitudeDim(); }
std::shared_ptr< Model > _model
Definition Likelihood.h:147

◆ getData()

ndarray::Array< Pixel const, 1, 1 > lsst::meas::modelfit::Likelihood::getData ( ) const
inlineinherited

Return the vector of weighted, scaled data points \(z\).

Definition at line 89 of file Likelihood.h.

89{ return _data; }
ndarray::Array< Pixel, 1, 1 > _data
Definition Likelihood.h:149

◆ getDataDim()

int lsst::meas::modelfit::Likelihood::getDataDim ( ) const
inlineinherited

Return the number of data points.

Definition at line 74 of file Likelihood.h.

74{ return _data.getSize<0>(); }

◆ getFixed()

ndarray::Array< Scalar const, 1, 1 > lsst::meas::modelfit::Likelihood::getFixed ( ) const
inlineinherited

Return the vector of fixed nonlinear parameters.

Definition at line 86 of file Likelihood.h.

86{ return _fixed; }
ndarray::Array< Scalar const, 1, 1 > _fixed
Definition Likelihood.h:148

◆ getFixedDim()

int lsst::meas::modelfit::Likelihood::getFixedDim ( ) const
inlineinherited

Return the number of fixed nonlinear parameters (set on Likelihood construction)

Definition at line 83 of file Likelihood.h.

83{ return _model->getFixedDim(); }

◆ getModel()

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

Return an object that defines the model and its parameters.

Definition at line 105 of file Likelihood.h.

105{ return _model; }

◆ getNonlinearDim()

int lsst::meas::modelfit::Likelihood::getNonlinearDim ( ) const
inlineinherited

Return the number of nonlinear parameters (which parameterize the model matrix)

Definition at line 80 of file Likelihood.h.

80{ return _model->getNonlinearDim(); }

◆ getUnweightedData()

ndarray::Array< Pixel const, 1, 1 > lsst::meas::modelfit::Likelihood::getUnweightedData ( ) const
inlineinherited

Return the vector of unweighted data points \(y\).

Definition at line 92 of file Likelihood.h.

92{ return _unweightedData; }
ndarray::Array< Pixel, 1, 1 > _unweightedData
Definition Likelihood.h:150

◆ getVariance()

ndarray::Array< Pixel const, 1, 1 > lsst::meas::modelfit::Likelihood::getVariance ( ) const
inlineinherited

Return the vector of per-data-point variances.

Definition at line 102 of file Likelihood.h.

102{ return _variance; }
ndarray::Array< Pixel, 1, 1 > _variance
Definition Likelihood.h:151

◆ getWeights()

ndarray::Array< Pixel const, 1, 1 > lsst::meas::modelfit::Likelihood::getWeights ( ) const
inlineinherited

Return the vector of weights \(w\) applied to data points and model matrix rows.

Will be an empty array if no weights are applied.

Definition at line 99 of file Likelihood.h.

99{ return _weights; }
ndarray::Array< Pixel, 1, 1 > _weights
Definition Likelihood.h:152

Member Data Documentation

◆ _data

ndarray::Array<Pixel,1,1> lsst::meas::modelfit::Likelihood::_data
protectedinherited

Definition at line 149 of file Likelihood.h.

◆ _fixed

ndarray::Array<Scalar const,1,1> lsst::meas::modelfit::Likelihood::_fixed
protectedinherited

Definition at line 148 of file Likelihood.h.

◆ _model

std::shared_ptr<Model> lsst::meas::modelfit::Likelihood::_model
protectedinherited

Definition at line 147 of file Likelihood.h.

◆ _unweightedData

ndarray::Array<Pixel,1,1> lsst::meas::modelfit::Likelihood::_unweightedData
protectedinherited

Definition at line 150 of file Likelihood.h.

◆ _variance

ndarray::Array<Pixel,1,1> lsst::meas::modelfit::Likelihood::_variance
protectedinherited

Definition at line 151 of file Likelihood.h.

◆ _weights

ndarray::Array<Pixel,1,1> lsst::meas::modelfit::Likelihood::_weights
protectedinherited

Definition at line 152 of file Likelihood.h.


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