File PhotometryMapping.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
jointcal
-
class
ChipVisitFluxMapping
: public lsst::jointcal::ChipVisitPhotometryMapping Public Functions
-
double
transformError
(MeasuredStar const &measuredStar, double value, double valueErr) const Return the on-sky transformed flux uncertainty for measuredStar on ccdImage. Matches the underlying PhotometryTransform’s
transformError()
until freezeErrorTransform() is called.- Return
The on-sky value transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The flux or magnitude to transform.[in] valueErr
: The flux or magnitude uncertainty to transform.
-
void
computeParameterDerivatives
(MeasuredStar const &measuredStar, double value, Eigen::Ref<Eigen::VectorXd> derivatives) const Compute the derivatives with respect to the parameters (i.e. the coefficients).
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to compute the derivative at.[out] derivatives
: The computed derivatives, in the same order as the deltas in offsetParams.
-
double
-
class
ChipVisitMagnitudeMapping
: public lsst::jointcal::ChipVisitPhotometryMapping Public Functions
-
double
transformError
(MeasuredStar const &measuredStar, double value, double valueErr) const Return the on-sky transformed flux uncertainty for measuredStar on ccdImage. Matches the underlying PhotometryTransform’s
transformError()
until freezeErrorTransform() is called.- Return
The on-sky value transformed from value at measuredStar’s position.
- Note
This method takes instFlux and instFluxErr: the error calculation has to use fluxes to get the math right.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The flux or magnitude to transform.[in] valueErr
: The flux or magnitude uncertainty to transform.
-
void
computeParameterDerivatives
(MeasuredStar const &measuredStar, double value, Eigen::Ref<Eigen::VectorXd> derivatives) const Compute the derivatives with respect to the parameters (i.e. the coefficients).
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to compute the derivative at.[out] derivatives
: The computed derivatives, in the same order as the deltas in offsetParams.
-
double
-
class
ChipVisitPhotometryMapping
: public lsst::jointcal::PhotometryMappingBase - #include <PhotometryMapping.h>
A two-level photometric transform: one for the ccd and one for the visit.
Subclassed by lsst::jointcal::ChipVisitFluxMapping, lsst::jointcal::ChipVisitMagnitudeMapping
Public Functions
-
std::size_t
getNpar
() const Number of total parameters in this mapping.
-
double
transform
(MeasuredStar const &measuredStar, double value) const Return the on-sky transformed flux for measuredStar on ccdImage.
- Return
The on-sky value () transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to transform.
-
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.
-
Eigen::VectorXd
getParameters
()
-
void
getMappingIndices
(IndexVector &indices) const Gets how this set of parameters (of length getNpar()) map into the “grand” fit. Expects that indices has enough space reserved.
-
void
setWhatToFit
(bool const fittingChips, bool const fittingVisits) Set whether to fit chips or visits.
This must be called before anything that depends on knowing the number of parameters in the fit, such as offsetParams(), getParameters(), or computeParameterDerivatives().
- Parameters
fittingChips
: Fit the chip transform.fittingVisits
: Fit the visit transform.
-
void
dump
(std::ostream &stream = std::cout) const Dump the contents of the transforms, for debugging.
-
std::shared_ptr<PhotometryMapping>
getChipMapping
() const
-
std::shared_ptr<PhotometryMapping>
getVisitMapping
() const
-
std::size_t
getNParChip
() const
-
std::size_t
getNParVisit
() const
Protected Attributes
-
std::size_t
_nParChip
-
std::size_t
_nParVisit
-
std::shared_ptr<PhotometryMapping>
_chipMapping
-
std::shared_ptr<PhotometryMapping>
_visitMapping
-
std::size_t
-
class
PhotometryMapping
: public lsst::jointcal::PhotometryMappingBase - #include <PhotometryMapping.h>
A mapping containing a single photometryTransform.
Public Functions
Value transform takes ownership of transform, error transform aliases it.
Call freezeErrorTransform() to unalias the error transform.
-
std::size_t
getNpar
() const Number of total parameters in this mapping.
-
double
transform
(MeasuredStar const &measuredStar, double value) const Return the on-sky transformed flux for measuredStar on ccdImage.
- Return
The on-sky value () transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to transform.
-
double
transformError
(MeasuredStar const &measuredStar, double value, double valueErr) const Return the on-sky transformed flux uncertainty for measuredStar on ccdImage. Matches the underlying PhotometryTransform’s
transformError()
until freezeErrorTransform() is called.- Return
The on-sky value transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The flux or magnitude to transform.[in] valueErr
: The flux or magnitude uncertainty to transform.
-
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
computeParameterDerivatives
(MeasuredStar const &measuredStar, double value, Eigen::Ref<Eigen::VectorXd> derivatives) const Compute the derivatives with respect to the parameters (i.e. the coefficients).
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to compute the derivative at.[out] derivatives
: The computed derivatives, in the same order as the deltas in offsetParams.
-
void
offsetParams
(Eigen::VectorXd const &delta) Offset the transform parameters by delta.
- Parameters
[in] delta
: vector to offset transform parameters. Same ordering as derivatives in computeParameterDerivatives();
-
Eigen::VectorXd
getParameters
()
-
void
getMappingIndices
(IndexVector &indices) const Gets how this set of parameters (of length getNpar()) map into the “grand” fit. Expects that indices has enough space reserved.
-
void
dump
(std::ostream &stream = std::cout) const Dump the contents of the transforms, for debugging.
-
std::shared_ptr<PhotometryTransform>
getTransform
() const
-
std::shared_ptr<PhotometryTransform>
getTransformErrors
() const
Private Members
-
std::shared_ptr<PhotometryTransform>
_transform
¶
-
std::shared_ptr<PhotometryTransform>
_transformErrors
¶
-
class
PhotometryMappingBase
- #include <PhotometryMapping.h>
Relates transform(s) to their position in the fitting matrix and allows interaction with the transform(s).
Subclassed by lsst::jointcal::ChipVisitPhotometryMapping, lsst::jointcal::PhotometryMapping
Public Functions
-
PhotometryMappingBase
()
-
virtual
~PhotometryMappingBase
()
-
PhotometryMappingBase
(PhotometryMappingBase const&) No copy or move: there is only ever one instance of a given mapping (i.e. per ccd+visit)
-
PhotometryMappingBase
(PhotometryMappingBase&&)
-
PhotometryMappingBase &
operator=
(PhotometryMappingBase const&)
-
PhotometryMappingBase &
operator=
(PhotometryMappingBase&&)
-
virtual std::size_t
getNpar
() const = 0 Number of total parameters in this mapping.
-
virtual double
transform
(MeasuredStar const &measuredStar, double value) const = 0 Return the on-sky transformed flux for measuredStar on ccdImage.
- Return
The on-sky value () transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to transform.
-
virtual double
transformError
(MeasuredStar const &measuredStar, double value, double valueErr) const = 0 Return the on-sky transformed flux uncertainty for measuredStar on ccdImage. Matches the underlying PhotometryTransform’s
transformError()
until freezeErrorTransform() is called.- Return
The on-sky value transformed from value at measuredStar’s position.
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The flux or magnitude to transform.[in] valueErr
: The flux or magnitude uncertainty to transform.
-
virtual void
freezeErrorTransform
() = 0 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.
-
virtual void
computeParameterDerivatives
(MeasuredStar const &measuredStar, double value, Eigen::Ref<Eigen::VectorXd> derivatives) const = 0 Compute the derivatives with respect to the parameters (i.e. the coefficients).
- Parameters
[in] measuredStar
: The measured star position to transform.[in] value
: The instrument flux or magnitude to compute the derivative at.[out] derivatives
: The computed derivatives, in the same order as the deltas in offsetParams.
-
void
setFixed
(bool _fixed) Make this mapping’s parameters fixed (i.e. not varied during fitting).
-
bool
isFixed
()
-
virtual Eigen::VectorXd
getParameters
() = 0
-
virtual void
getMappingIndices
(IndexVector &indices) const = 0 Gets how this set of parameters (of length getNpar()) map into the “grand” fit. Expects that indices has enough space reserved.
-
virtual void
dump
(std::ostream &stream = std::cout) const = 0 Dump the contents of the transforms, for debugging.
-
Eigen::Index
getIndex
() Get the index of this mapping in the grand fit.
-
void
setIndex
(Eigen::Index i) Set the index of this mapping in the grand fit.
Protected Attributes
-
Eigen::Index
index
-
bool
fixed
-
-
class