# How do I use color terms when calibrating fluxes?

**URL:** <https://www.rubin.community/t/how-do-i-use-color-terms-when-calibrating-fluxes/93>\
**Category:** Support\
**Tags:** photometry\
**Created:** [August 19, 2015, 6:23pm UTC](https://www.rubin.community/t/how-do-i-use-color-terms-when-calibrating-fluxes/93 "2015-08-19T18:23:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsick](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jsick/32/672_2.png) [@jsick](https://www.rubin.community/u/jsick)\
**Post date:** [August 19, 2015, 6:23pm UTC](https://www.rubin.community/t/how-do-i-use-color-terms-when-calibrating-fluxes/93/1 "2015-08-19T18:23:01Z")

</div>

How do I use color terms when calibrating fluxes?

---

<div class="post-metadata">

**Author:** ![ivezic](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ivezic/32/49_2.png) [@ivezic](https://www.rubin.community/u/ivezic)\
**Post date:** [August 26, 2015, 5:50am UTC](https://www.rubin.community/t/how-do-i-use-color-terms-when-calibrating-fluxes/93/2 "2015-08-26T05:50:19Z")

</div>

Do you mean in standard astronomical way with linear terms, or using  
LSST approach? If the latter, see eqs. in Sec. 4.1 from LSE-180.

---

<div class="post-metadata">

**Author:** ![rowen](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/rowen/32/52_2.png) [@rowen](https://www.rubin.community/u/rowen)\
**Post date:** [August 28, 2015, 3:48pm UTC](https://www.rubin.community/t/how-do-i-use-color-terms-when-calibrating-fluxes/93/3 "2015-08-28T15:48:54Z")

</div>

This post describes how to apply color term corrections using the LSST DM software stack as of 2015-08-28.

Color term corrections are applied by the `PhotoCalTask`, which is called by `ProcessCcdTask`. Applying color term corrections requires two things:

1. You must enable colorterm corrections by setting config parameter `calibrate.photocal.applyColorTerms=True`. You may also set `calibrate.photocal.photoCatName` to to the name of the reference catalog, but the default value of `None` uses the name of the `astrometry_net_data` product you have setup, and that will usually work.

2. You must have color term correction data available for the camera and reference catalog in question. Color term correction data is contained in `obs_*` packages in the directory `config/[camera/]colorterms.py`. For an example see `obs_subaru`. Color term data is stored in a `ColortermLibrary`, a dictionary of reference catalog name: (dictionary of science filter name: `Colorterm`). `Colorterm` contains color term correction coefficients for one science filter.

For more information see `PhotoCalTask`, `Colorterm` and `ColortermLibrary`, all presently in `pipe_tasks`.

Many improvements are planned, including:

- Improve the way color term data is stored and retrieved. We want to add a temporal component and manage it the same way we manage other calibration data. This awaits the so-called “butler 2”.
- Move the classes out of `pipe_tasks`, possibly into `meas_photometry`.
- Improve our color term correction model.
