lsst.jointcal  16.0-3-g21cc1d5+2
Public Member Functions | List of all members
lsst::jointcal::SimplePhotometryModel Class Reference

Photometric response model which has a single photometric factor per CcdImage. More...

#include <SimplePhotometryModel.h>

Inheritance diagram for lsst::jointcal::SimplePhotometryModel:
lsst::jointcal::PhotometryModel

Public Member Functions

 SimplePhotometryModel (CcdImageList const &ccdImageList)
 
 SimplePhotometryModel (SimplePhotometryModel const &)=delete
 No copy or move: there is only ever one instance of a given model (i.e. per ccd+visit) More...
 
 SimplePhotometryModel (SimplePhotometryModel &&)=delete
 
SimplePhotometryModeloperator= (SimplePhotometryModel const &)=delete
 
SimplePhotometryModeloperator= (SimplePhotometryModel &&)=delete
 
unsigned assignIndices (std::string const &whatToFit, unsigned firstIndex) override
 Assign indices to parameters involved in mappings, starting at firstIndex. More...
 
void offsetParams (Eigen::VectorXd const &delta) override
 Offset the parameters by the provided amounts. More...
 
double transform (CcdImage const &ccdImage, MeasuredStar const &measuredStar, double instFlux) const override
 Return the on-sky transformed flux for measuredStar on ccdImage. More...
 
double transformError (CcdImage const &ccdImage, MeasuredStar const &measuredStar, double instFluxErr) const override
 Return the on-sky transformed flux uncertainty for measuredStar on ccdImage. More...
 
void freezeErrorTransform () override
 Once this routine has been called, the error transform is not modified by offsetParams(). More...
 
void getMappingIndices (CcdImage const &ccdImage, std::vector< unsigned > &indices) const override
 Get how this set of parameters (of length Npar()) map into the "grand" fit. More...
 
int getTotalParameters () const override
 Return the total number of parameters in this model. More...
 
void computeParameterDerivatives (MeasuredStar const &measuredStar, CcdImage const &ccdImage, Eigen::VectorXd &derivatives) const override
 Compute the parametric derivatives of this model. More...
 
std::shared_ptr< afw::image::PhotoCalibtoPhotoCalib (CcdImage const &ccdImage) const override
 Return the mapping of ccdImage represented as a PhotoCalib. More...
 
void dump (std::ostream &stream=std::cout) const override
 Dump the contents of the transfos, for debugging. More...
 
unsigned getNpar (CcdImage const &ccdImage) const
 Return the number of parameters in the mapping of CcdImage. More...
 
PhotometryMappingBase const & getMapping (CcdImage const &ccdImage) const
 Get the mapping associated with ccdImage. More...
 

Detailed Description

Photometric response model which has a single photometric factor per CcdImage.

Definition at line 20 of file SimplePhotometryModel.h.

Constructor & Destructor Documentation

◆ SimplePhotometryModel() [1/3]

lsst::jointcal::SimplePhotometryModel::SimplePhotometryModel ( CcdImageList const &  ccdImageList)

Definition at line 17 of file SimplePhotometryModel.cc.

◆ SimplePhotometryModel() [2/3]

lsst::jointcal::SimplePhotometryModel::SimplePhotometryModel ( SimplePhotometryModel const &  )
delete

No copy or move: there is only ever one instance of a given model (i.e. per ccd+visit)

◆ SimplePhotometryModel() [3/3]

lsst::jointcal::SimplePhotometryModel::SimplePhotometryModel ( SimplePhotometryModel &&  )
delete

Member Function Documentation

◆ assignIndices()

unsigned lsst::jointcal::SimplePhotometryModel::assignIndices ( std::string const &  whatToFit,
unsigned  firstIndex 
)
overridevirtual

Assign indices to parameters involved in mappings, starting at firstIndex.

Parameters
[in]whatToFitString containing parameters to fit.
[in]firstIndexIndex to start assigning at.
Returns
The highest assigned index.

Implements lsst::jointcal::PhotometryModel.

Definition at line 30 of file SimplePhotometryModel.cc.

◆ computeParameterDerivatives()

void lsst::jointcal::SimplePhotometryModel::computeParameterDerivatives ( MeasuredStar const &  measuredStar,
CcdImage const &  ccdImage,
Eigen::VectorXd &  derivatives 
) const
overridevirtual

Compute the parametric derivatives of this model.

Parameters
[in]measuredStarThe measured star with the position and flux to compute at.
[in]ccdImageThe ccdImage containing the measured star, to find the correct mapping.
[out]derivativesThe computed derivatives. Must be pre-allocated to the correct size.

Implements lsst::jointcal::PhotometryModel.

Definition at line 80 of file SimplePhotometryModel.cc.

◆ dump()

void lsst::jointcal::SimplePhotometryModel::dump ( std::ostream stream = std::cout) const
overridevirtual

Dump the contents of the transfos, for debugging.

Implements lsst::jointcal::PhotometryModel.

Definition at line 94 of file SimplePhotometryModel.cc.

◆ freezeErrorTransform()

void lsst::jointcal::SimplePhotometryModel::freezeErrorTransform ( )
overridevirtual

Once this routine has been called, the error transform is not modified by offsetParams().

The routine can be called when the mappings are roughly in place. After the call, the transformations used to propagate errors are no longer affected when updating the mappings. This allows an exactly linear fit, which can be necessary for some model+data combinations.

Implements lsst::jointcal::PhotometryModel.

Definition at line 59 of file SimplePhotometryModel.cc.

◆ getMapping()

PhotometryMappingBase const& lsst::jointcal::PhotometryModel::getMapping ( CcdImage const &  ccdImage) const
inlineinherited

Get the mapping associated with ccdImage.

Definition at line 103 of file PhotometryModel.h.

◆ getMappingIndices()

void lsst::jointcal::SimplePhotometryModel::getMappingIndices ( CcdImage const &  ccdImage,
std::vector< unsigned > &  indices 
) const
overridevirtual

Get how this set of parameters (of length Npar()) map into the "grand" fit.

Parameters
[in]ccdImageThe ccdImage to look up.
[out]indicesThe indices of the mapping associated with ccdImage.

Implements lsst::jointcal::PhotometryModel.

Definition at line 65 of file SimplePhotometryModel.cc.

◆ getNpar()

unsigned lsst::jointcal::PhotometryModel::getNpar ( CcdImage const &  ccdImage) const
inlineinherited

Return the number of parameters in the mapping of CcdImage.

Definition at line 100 of file PhotometryModel.h.

◆ getTotalParameters()

int lsst::jointcal::SimplePhotometryModel::getTotalParameters ( ) const
overridevirtual

Return the total number of parameters in this model.

Implements lsst::jointcal::PhotometryModel.

Definition at line 72 of file SimplePhotometryModel.cc.

◆ offsetParams()

void lsst::jointcal::SimplePhotometryModel::offsetParams ( Eigen::VectorXd const &  delta)
overridevirtual

Offset the parameters by the provided amounts.

The shifts are applied according to the indices given in assignIndices.

Parameters
[in]deltavector of offsets to apply

Implements lsst::jointcal::PhotometryModel.

Definition at line 40 of file SimplePhotometryModel.cc.

◆ operator=() [1/2]

SimplePhotometryModel& lsst::jointcal::SimplePhotometryModel::operator= ( SimplePhotometryModel const &  )
delete

◆ operator=() [2/2]

SimplePhotometryModel& lsst::jointcal::SimplePhotometryModel::operator= ( SimplePhotometryModel &&  )
delete

◆ toPhotoCalib()

std::shared_ptr< afw::image::PhotoCalib > lsst::jointcal::SimplePhotometryModel::toPhotoCalib ( CcdImage const &  ccdImage) const
overridevirtual

Return the mapping of ccdImage represented as a PhotoCalib.

Note
SimplePhotometryModel uses a spatially-invariant transfo, so we can simplify the PhotoCalib.

Implements lsst::jointcal::PhotometryModel.

Definition at line 87 of file SimplePhotometryModel.cc.

◆ transform()

double lsst::jointcal::SimplePhotometryModel::transform ( CcdImage const &  ccdImage,
MeasuredStar const &  measuredStar,
double  instFlux 
) const
overridevirtual

Return the on-sky transformed flux for measuredStar on ccdImage.

Parameters
[in]ccdImageThe ccdImage where measuredStar resides.
measuredStarThe measured star position to compute the transform at.
[in]instFluxThe instrument flux to transform.
Returns
The on-sky flux transformed from instFlux at measuredStar's position.

Implements lsst::jointcal::PhotometryModel.

Definition at line 47 of file SimplePhotometryModel.cc.

◆ transformError()

double lsst::jointcal::SimplePhotometryModel::transformError ( CcdImage const &  ccdImage,
MeasuredStar const &  measuredStar,
double  instFluxErr 
) const
overridevirtual

Return the on-sky transformed flux uncertainty for measuredStar on ccdImage.

Identical to transform() until freezeErrorTransform() is called.

Parameters
[in]ccdImageThe ccdImage where measuredStar resides.
measuredStarThe measured star position to compute the transform at.
[in]instFluxErrThe instrument flux error to transform.
Returns
The on-sky flux transformed from instFlux at measuredStar's position.

Implements lsst::jointcal::PhotometryModel.

Definition at line 53 of file SimplePhotometryModel.cc.


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