Class SimplePhotometryModel

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class SimplePhotometryModel : public lsst::jointcal::PhotometryModel

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

Subclassed by lsst::jointcal::SimpleFluxModel, lsst::jointcal::SimpleMagnitudeModel

Public Functions

SimplePhotometryModel(CcdImageList const &ccdImageList, LOG_LOGGER log, double errorPedestal_ = 0)
SimplePhotometryModel(SimplePhotometryModel const&)

No copy or move: there is only ever one instance of a given model.

SimplePhotometryModel(SimplePhotometryModel&&)
SimplePhotometryModel &operator=(SimplePhotometryModel const&)
SimplePhotometryModel &operator=(SimplePhotometryModel&&)
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<PhotometryMapping>> MapType

Protected Functions

PhotometryMappingBase *findMapping(CcdImage const &ccdImage) const

Return the mapping associated with this ccdImage.

Protected Attributes

MapType _myMap