33 LOG_LOGGER _log =
LOG_GET(
"jointcal.PhotometryMapping");
74 double instFluxErr)
const {
77 _chipMapping->getTransformErrors()->transform(measuredStar.
x, measuredStar.
y, instFluxErr);
83 Eigen::Ref<Eigen::VectorXd> derivatives)
const {
88 double chipScale =
_chipMapping->getTransform()->transform(measuredStar.
x, measuredStar.
y, 1);
96 Eigen::Ref<Eigen::VectorXd> chipBlock = derivatives.segment(0,
getNParChip());
97 _chipMapping->getTransform()->computeParameterDerivatives(measuredStar.
x, measuredStar.
y, instFlux,
99 chipBlock *= visitScale;
106 visitBlock *= chipScale;
113 double instFluxErr)
const {
116 return 2.5 /
std::log(10.0) * instFluxErr / instFlux;
120 Eigen::Ref<Eigen::VectorXd> derivatives)
const {
128 Eigen::Ref<Eigen::VectorXd> chipBlock = derivatives.segment(0,
getNParChip());
129 _chipMapping->getTransform()->computeParameterDerivatives(measuredStar.
x, measuredStar.
y, instFlux,
unsigned getNParVisit() const
unsigned getNParChip() const
double transformError(MeasuredStar const &measuredStar, double value, double valueErr) const override
Return the on-sky transformed flux uncertainty for measuredStar on ccdImage.
std::shared_ptr< PhotometryMapping > _visitMapping
void getMappingIndices(std::vector< unsigned > &indices) const override
Gets how this set of parameters (of length getNpar()) map into the "grand" fit.
void setWhatToFit(bool const fittingChips, bool const fittingVisits)
Set whether to fit chips or visits.
void computeParameterDerivatives(MeasuredStar const &measuredStar, double value, Eigen::Ref< Eigen::VectorXd > derivatives) const override
Compute the derivatives with respect to the parameters (i.e.
double transformError(MeasuredStar const &measuredStar, double value, double valueErr) const override
Return the on-sky transformed flux uncertainty for measuredStar on ccdImage.
std::shared_ptr< PhotometryMapping > _chipMapping
Class for a simple mapping implementing a generic AstrometryTransform.
void computeParameterDerivatives(MeasuredStar const &measuredStar, double value, Eigen::Ref< Eigen::VectorXd > derivatives) const override
Compute the derivatives with respect to the parameters (i.e.
objects measured on actual images.
unsigned getNpar() const override
Number of total parameters in this mapping.