7 LOG_LOGGER _log =
LOG_GET(
"jointcal.PhotometryMapping");
15 Eigen::Ref<Eigen::VectorXd> derivatives)
const {
20 double chipScale = _chipMapping->getTransfo()->transform(measuredStar.
x, measuredStar.
y, 1);
22 _visitMapping->getTransfo()->transform(measuredStar.
getXFocal(), measuredStar.
getYFocal(), 1);
26 if (_nParChips > 0 && !_chipMapping->isFixed()) {
28 Eigen::Ref<Eigen::VectorXd> chipBlock = derivatives.segment(0, _nParChips);
29 _chipMapping->getTransfo()->computeParameterDerivatives(measuredStar.
x, measuredStar.
y, instFlux,
31 chipBlock *= visitScale;
33 if (_nParVisits > 0) {
35 Eigen::Ref<Eigen::VectorXd> visitBlock = derivatives.segment(_nParChips, _nParVisits);
36 _visitMapping->getTransfo()->computeParameterDerivatives(
38 visitBlock *= chipScale;
45 _chipMapping->getMappingIndices(indices);
47 if (_nParVisits > 0) {
51 _visitMapping->getMappingIndices(tempIndices);
52 for (
unsigned k = 0; k < _visitMapping->getNpar(); ++k) {
53 indices.
at(k + _nParChips) = tempIndices.at(k);
60 _nParChips = _chipMapping->getNpar();
65 _nParVisits = _visitMapping->getNpar();
void computeParameterDerivatives(MeasuredStar const &measuredStar, double instFlux, Eigen::Ref< Eigen::VectorXd > derivatives) const override
Compute the derivatives with respect to the parameters (i.e.
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.
Class for a simple mapping implementing a generic Gtransfo.
objects measured on actual images.
unsigned getNpar() const override
Number of total parameters in this mapping.