File UnitTransformedLikelihood.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace meas
namespace modelfit
class EpochFootprint
#include <UnitTransformedLikelihood.h>

An image at one epoch of a galaxy, plus associated info

Includes one image of a galaxy and and associated footprint and multi-shapelet PSF model

Public Functions

EpochFootprint(afw::detection::Footprint const &footprint, afw::image::Exposure<Pixel> const &exposure, shapelet::MultiShapeletFunction const &psf)

Construct a EpochFootprint.

Parameters
  • [in] footprint: Footprint of source (galaxy) on calexp

  • [in] exposure: Subregion of calexp that includes footprint

  • [in] psf: Multi-shapelet representation of exposure PSF evaluated at location of galaxy

Public Members

afw::detection::Footprint const footprint

footprint of source (galaxy)

afw::image::Exposure<Pixel> const exposure

subregion of exposure that includes footprint

shapelet::MultiShapeletFunction const psf

multi-shapelet model of exposure PSF

class UnitTransformedLikelihood : public lsst::meas::modelfit::Likelihood
#include <UnitTransformedLikelihood.h>

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 modelfitUnits), 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.

Public Functions

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

Evaluate the model for the given vector of nonlinear parameters.

Parameters
  • [out] modelMatrix: The 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] nonlinear: Vector of nonlinear parameters at which to evaluate the model.

  • [in] doApplyWeights: If False, do not apply the weights to the modelMatrix.

lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood(PTR ( Model ) model, ndarray::Array< Scalar const, 1, 1 > const & fixed, UnitSystem const & fitSys, geom::SpherePoint const & position, std::vector< PTR ( EpochFootprint )> const & epochFootprintList, UnitTransformedLikelihoodControl const & ctrl)

Initialize a UnitTransformedLikelihood with data from multiple exposures.

Parameters
  • [in] model: Object that defines the model to fit and its parameters.

  • [in] fixed: Model parameters that are held fixed.

  • [in] fitSys: Geometric and photometric system to fit in

  • [in] position: ICRS sky position of object being fit

  • [in] epochFootprintList: List of shared pointers to EpochFootprint

  • [in] ctrl: Control object with various options

lsst::meas::modelfit::UnitTransformedLikelihood::UnitTransformedLikelihood(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.

Parameters
  • [in] model: Object that defines the model to fit and its parameters.

  • [in] fixed: Model parameters that are held fixed.

  • [in] fitSys: Geometric and photometric system to fit in

  • [in] position: ICRS sky position of object being fit

  • [in] exposure: Exposure containing the data to fit

  • [in] footprint: Footprint that defines the pixels to include in the fit

  • [in] psf: Shapelet approximation to the PSF

  • [in] ctrl: Control object with various options

virtual ~UnitTransformedLikelihood()

Private Members

std::unique_ptr<Impl> _impl
class UnitTransformedLikelihoodControl
#include <UnitTransformedLikelihood.h>

Control object used to initialize a UnitTransformedLikelihood.

Translated to Python as UnitTransformedLikelihoodConfig; the Swig-wrapped C++ Control object can be created from the config object via the makeControl() method (see lsst.pex.config.wrap).

Public Functions

lsst::meas::modelfit::UnitTransformedLikelihoodControl::LSST_CONTROL_FIELD(usePixelWeights, bool, "whether to individually weigh pixels using the variance image.")
lsst::meas::modelfit::UnitTransformedLikelihoodControl::LSST_CONTROL_FIELD(weightsMultiplier, double, "Scaling factor to apply to weights.")
UnitTransformedLikelihoodControl(bool usePixelWeights_ = false, double weightsMultiplier_ = 1.0)