Details

Type: RFC

Status: Implemented

Resolution: Done

Component/s: DM

Labels:None
Description
To improve jointcal's photometric fitting, we need a way to represent a spatiallyvarying photometric model. Our current Calib object is a constant flux/magnitude zero point (fluxMag0) per ccd/visit. We expect to want to handle a spatially varying component (whether due to sky, optical system, filters, a shift across a CCD, or some combination thereof), and jointcal should be able to fit such a model. As an example, HSC's meas_mosaic fits a 7th order polynomial on the focal plane, plus a fluxMag0 per CCD.
I propose a replacement for lsst::afw::image::Calib that is built on top of an lsst::afw::math::BoundedField, defined in terms of the conversion from counts to flux in maggies. It will have countsToMaggies() and countsToMagnitudes() methods (replacing the current getMagnitude()) that take counts and/or a point, as well as a SourceRecord or SourceCatalog. The new PhotoCalib will behave the same as the old Calib for spatially invariant scaling (i.e. only fluxMag0 is defined).
The class docstring for the new PhotoCalib object is as follows:
/**

* @brief The photometric calibration of an exposure.

*

* A PhotoCalib is a BoundedField (a function with a specified domain) that converts between calibrated

* countsonchip (ADU) to flux and magnitude. It is defined in terms of "maggies", which are a linear

* unit defined in SDSS: http://www.sdss.org/dr12/algorithms/magnitudes/#nmgy

*

* PhotoCalib is immutable.

*

* The spatially varying flux/magnitude zero point is defined such that,

* at a position (x,y) in the domain of the boundedField zeroPoint

* and for a given measured source counts:

* zeroPoint(x,y) * counts = flux (in maggies)

* while the errors (constant on the domain) are defined as:

* sqrt(countsSigma^2 + zeroPointSigma^2) = fluxSigma (in maggies)

*/

You can see the full API for the new PhotoCalib on this gist.
Attachments
Issue Links
 is triggering

DM9192 Implement new spatiallyvariable PhotoCalib model
 Done
 relates to

DM10153 Replace Calib with finished PhotoCalib
 Done

DM11905 Fix PhotoCalib defintion to use multiplication
 Done

RFC573 Backwards compatibility API for Calib>PhotoCalib transition
 Implemented

DM9184 Higher order models for jointcal photometric solutions
 Done

DM9193 design new Calib object and interface
 Done

RFC549 Use nanojansky for calibrated fluxes in DM code and intermediate data products
 Implemented
LDM151 (draft version, ยง9.9 in the copy I'm looking at) defines a new PhotoCalib object which represents "spatially and wavelengthdependent photometric calibration".
I know that you've discussed your new design for Calib with Jim Bosch. Can one or both of you comment on how the new Calib you're proposing relates to the LDM151 design? That could be both at the fairly trivial level (do you propose to rename it PhotoCalib to follow the LDM151 terminology?) and in more substantive terms (how extensible will your your design be to meet the full requirements as described in LDM151?).