# Importance of photometry calibration at CCD level for coadded images

**URL:** <https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813>\
**Category:** Data Management\
**Created:** [April 25, 2017, 2:19pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813 "2017-04-25T14:19:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![boutigny](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/boutigny/32/26_2.png) [@boutigny](https://www.rubin.community/u/boutigny)\
**Post date:** [April 25, 2017, 2:19pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/1 "2017-04-25T14:19:53Z")

</div>

This is probably a very basic question but I am wondering how the zero point determined while reducing individual CCD images are propagated to the coadded images ? In other word; how important is it to determine the zero point for individual CCD if one performs a calibration like stellar locus regression on the coadded images ?

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2017, 2:36pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/2 "2017-04-25T14:36:25Z")

</div>

For HSC, we have been using meas\_mosaic to set a position-dependent magnitude zero-point (kinda like “ubercal”). @parejkoj is in the process of putting the same capability into jointcal.

Getting the zero-points aligned on the individual CCDs (so that sources have the same calibrated flux level) is important, even if you’re planning to calibrate the coadds independently: if they aren’t aligned you’re going to introduce additional noise in the coadd.

---

<div class="post-metadata">

**Author:** ![boutigny](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/boutigny/32/26_2.png) [@boutigny](https://www.rubin.community/u/boutigny)\
**Post date:** [April 25, 2017, 2:47pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/3 "2017-04-25T14:47:47Z")

</div>

Ok, that makes sense. But are the coadd actually recalibrated in the current pipeline ? If yes where is it done ? measureCoaddSources ?

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2017, 3:08pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/4 "2017-04-25T15:08:46Z")

</div>

No, we currently don’t have a facility for recalibrating the coadd. I think QA on the coadd measurements indicates that this is not necessary.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2017, 3:12pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/5 "2017-04-25T15:12:44Z")

</div>

> [@price](#):
>
> I think QA on the coadd measurements indicates that this is not necessary.

But you certainly shouldn’t let that stop you! If you put a stellar locus regression `Task` together, it’ll be a very useful QA tool.

---

<div class="post-metadata">

**Author:** ![boutigny](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/boutigny/32/26_2.png) [@boutigny](https://www.rubin.community/u/boutigny)\
**Post date:** [April 25, 2017, 3:28pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/6 "2017-04-25T15:28:36Z")

</div>

We are working on 2 fronts for the DESC cluster analysis on CFHT data:

- Improving photometric calibration at CCD level by using SNLS catalogs as in Betoule et al. 2013
- implementing stellar locus regression at the coadd level

But I think that we should also improve getZeroPoint() in pipe\_tasks/…/photocal.py as it does not take into account the errors on magnitudes from the reference catalog (unless this has been changed recently, but I don’t think so)

---

<div class="post-metadata">

**Author:** ![parejkoj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/parejkoj/32/138_2.png) [@parejkoj](https://www.rubin.community/u/parejkoj)\
**Post date:** [April 25, 2017, 4:52pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/7 "2017-04-25T16:52:23Z")

</div>

> [@boutigny](#):
>
> But I think that we should also improve getZeroPoint() in pipe\_tasks/…/photocal.py as it does not take into account the errors on magnitudes from the reference catalog

I’d suggest we skip that, and spend our efforts improving the photometric fit in jointcal (which I plan to start very soon). That would be our go-to source for calibration in the future, no?

---

<div class="post-metadata">

**Author:** ![boutigny](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/boutigny/32/26_2.png) [@boutigny](https://www.rubin.community/u/boutigny)\
**Post date:** [April 25, 2017, 5:24pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/8 "2017-04-25T17:24:41Z")

</div>

> [@parejkoj](#):
>
> I’d suggest we skip that, and spend our efforts improving the photometric fit in jointcal (which I plan to start very soon). That would be our go-to source for calibration in the future, no?

I agree that it is better to put the efforts on improving the photometric fit in jointcal now, but it’s a little bit embarrassing to keep a bugged CCD photocal in our pipeline. This is also bad for future multifit algorithms which will be running on individual exposures, not coadded ones.

---

<div class="post-metadata">

**Author:** ![jbosch](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jbosch/32/12_2.png) [@jbosch](https://www.rubin.community/u/jbosch)\
**Post date:** [April 26, 2017, 1:55pm UTC](https://www.rubin.community/t/importance-of-photometry-calibration-at-ccd-level-for-coadded-images/1813/9 "2017-04-26T13:55:21Z")

</div>

I’m embarrassed by the current behavior of PhotoCalTask as well, but I also don’t think it’s doing much harm. As for multifit, it will definitely use JointCal outputs for both photometry and astrometry, so the initial CCD-level versions of those don’t matter there either. Where they will matter much more is in Alert Production.
