Class ConstrainedPhotometryModel¶
Defined in File ConstrainedPhotometryModel.h
Inheritance Relationships¶
Base Type¶
public lsst::jointcal::PhotometryModel
(Class PhotometryModel)
Derived Types¶
public lsst::jointcal::ConstrainedFluxModel
(Class ConstrainedFluxModel)public lsst::jointcal::ConstrainedMagnitudeModel
(Class ConstrainedMagnitudeModel)
Class Documentation¶
-
class
ConstrainedPhotometryModel
: public lsst::jointcal::PhotometryModel¶ Photometry model with constraints, \(M(x,y) = M_CCD(x,y)*M_visit(u,v)\)
This model consists of the following components:
A spatially invariant zero point per CCD, constrained across all visits, \(M_CCD\).
A Chebyshev polynomial ( \(a_ij*T_i(x)*T_j(y)\) ) per visit, constrained across all CCDs, \(M_visit\).
Because this model’s parameters are degenerate under multiplication by a constant, \(M=(a*M_CCD)*(1/a*M_visit)\), we hold one CCD’s zero point fixed to remove that degeneracy.
Subclassed by lsst::jointcal::ConstrainedFluxModel, lsst::jointcal::ConstrainedMagnitudeModel
Public Functions
-
ConstrainedPhotometryModel
(CcdImageList const &ccdImageList, geom::Box2D const &focalPlaneBBox, LOG_LOGGER log, int visitOrder = 7, double errorPedestal_ = 0)¶ Construct a constrained photometry model.
- Parameters
ccdImageList
: The list of CCDImages to construct the model for.focalPlaneBBox
: The bounding box of the camera’s focal plane, defining the domain of the visit polynomial.[in] log
: An lsst::log::Log instance to log messages to.[in] visitOrder
: The order of the visit polynomial.[in] errorPedestal_
: A pedestal in flux or magnitude to apply to all MeasuredStar flux errors.
-
ConstrainedPhotometryModel
(ConstrainedPhotometryModel const&)¶ No copy or move: there is only ever one instance of a given model (i.e. per ccd+visit)
-
ConstrainedPhotometryModel
(ConstrainedPhotometryModel&&)¶
-
ConstrainedPhotometryModel &
operator=
(ConstrainedPhotometryModel const&)¶
-
ConstrainedPhotometryModel &
operator=
(ConstrainedPhotometryModel&&)¶
-
Eigen::Index
assignIndices
(std::string const &whatToFit, Eigen::Index firstIndex)¶ Assign indices in the full matrix to the parameters being fit in the mappings, starting at firstIndex.
- Return
The highest assigned index.
- Parameters
[in] whatToFit
: String containing parameters to fit.[in] firstIndex
: Index to start assigning at.
-
void
offsetParams
(Eigen::VectorXd const &delta)¶ Offset the parameters by the provided amounts (by -delta).
The shifts are applied according to the indices given in assignIndices.
- Parameters
[in] delta
: vector of offsets to apply
-
void
freezeErrorTransform
()¶ 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.
-
void
getMappingIndices
(CcdImage const &ccdImage, IndexVector &indices) const¶ Get how this set of parameters (of length Npar()) map into the “grand” fit.
- Parameters
[in] ccdImage
: The ccdImage to look up.[out] indices
: The indices of the mapping associated with ccdImage.
-
std::size_t
getTotalParameters
() const¶ Return the total number of parameters in this model.
-
void
computeParameterDerivatives
(MeasuredStar const &measuredStar, CcdImage const &ccdImage, Eigen::VectorXd &derivatives) const¶ Compute the parametric derivatives of this model.
- Parameters
[in] measuredStar
: The measured star with the position and flux to compute at.[in] ccdImage
: The ccdImage containing the measured star, to find the correct mapping.[out] derivatives
: The computed derivatives. Must be pre-allocated to the correct size.
-
void
dump
(std::ostream &stream = std::cout) const¶ Dump the contents of the transforms, for debugging.
Protected Types
-
typedef std::unordered_map<CcdImageKey, std::unique_ptr<ChipVisitPhotometryMapping>>
MapType
¶
-
typedef std::map<VisitIdType, std::shared_ptr<PhotometryMapping>>
VisitMapType
¶
-
typedef std::map<CcdIdType, std::shared_ptr<PhotometryMapping>>
ChipMapType
¶
Protected Functions
-
PhotometryMappingBase *
findMapping
(CcdImage const &ccdImage) const¶ Return a pointer to the mapping associated with this ccdImage.
-
template<class
ChipTransform
, classVisitTransform
, classChipVisitMapping
>
voidinitialize
(CcdImageList const &ccdImageList, geom::Box2D const &focalPlaneBBox, int visitOrder)¶ Initialize the chip, visit, and chipVisit mappings by creating appropriate transforms and mappings.
Return the initial calibration to use from this photoCalib.
-
PrepPhotoCalib
prepPhotoCalib
(CcdImage const &ccdImage) const¶ Helper for preparing toPhotoCalib()