# Handling deblended objects in catalogs

**URL:** <https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007>\
**Category:** Data Management\
**Created:** [August 8, 2016, 1:28pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007 "2016-08-08T13:28:02Z")\
**Posts on this page:** 10\
**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:** [August 8, 2016, 1:28pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/1 "2016-08-08T13:28:02Z")

</div>

With @nchotard we discovered that when a source is deblended, the parent object remains in the catalog with apparently meaningful quantities attached to it. It means that when iterating over sources, one should be careful to reject objects with deblend\_nChild != 0 otherwise there is some sort of double counting.  
For such parent objects, we are wondering what is the meaning of quantities like modelfit\_CModel\_flux which seems to be defined for correctly shaped galaxy only ?  
Have we missed something ?

---

<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:** [August 8, 2016, 1:42pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/2 "2016-08-08T13:42:36Z")

</div>

Quantities such as centroids, shapes and model-fit fluxes are probably not very useful for parent objects, but it’s important to keep track of them in the catalog for the sake of deblending.

---

<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:** [August 8, 2016, 1:49pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/3 "2016-08-08T13:49:23Z")

</div>

Yes, I agree that it is important to keep track of them, but I would expect meaningless values to be flagged (i.e. “modelfit\_CModel\_flag”)

---

<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:** [August 8, 2016, 2:25pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/4 "2016-08-08T14:25:41Z")

</div>

We have a separate flag `detect_isPrimary` in the coadd processing that should be used in addition to any per-measurement flags. This will reject deblended parents and redundant objects in tract/patch overlap regions.

---

<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:** [August 8, 2016, 4:34pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/5 "2016-08-08T16:34:16Z")

</div>

I recently filed an [epic to improve the various astrometry-related flags](https://jira.lsstcorp.org/browse/DM-7099). Would it be worth clarifying this as part of that epic?

On the other hand, are these sorts of details written down anywhere? The interaction of our various flags seems impossible to understand with out expert guidance.

---

<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:** [August 8, 2016, 5:00pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/6 "2016-08-08T17:00:51Z")

</div>

> [@parejkoj](#):
>
> The interaction of our various flags seems impossible to understand with out expert guidance.

This statement is rather broader than I would be willing to agree with. We have regular scientists doing science with HSC using essentially the same set of flags. Maybe we’ve got a bit of extra documentation (e.g., our [pipeline description document](http://hsca.ipmu.jp/pipeline_outputs.pdf) has a section on flags) that LSST could steal, but I don’t think regular scientists really look at that document. It seems to me that what happens is that people with knowledge of the pipeline suggest some flags that people should care about, and then a scientist willing to experiment uses that information and suggests a “canonical set” of flags, and then everyone else follow suit. I think LSST isn’t processing science data in earnest, and so hasn’t gone through all of that. Maybe that kind of operation isn’t real “understanding”, but certainly regular scientists are able to use the flags with a bit of guidance.

---

<div class="post-metadata">

**Author:** ![RHL](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/rhl/32/25_2.png) [@RHL](https://www.rubin.community/u/RHL)\
**Post date:** [August 8, 2016, 5:36pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/7 "2016-08-08T17:36:43Z")

</div>

The SDSS page is at [http://www.sdss.org/dr12/tutorials/flags](http://www.sdss.org/dr12/tutorials/flags).

A couple of links down you’ll find my detailed document: [http://www.astro.princeton.edu/~rhl/flags.html](http://www.astro.princeton.edu/~rhl/flags.html)

---

<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:** [August 8, 2016, 7:20pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/8 "2016-08-08T19:20:43Z")

</div>

Is there a one-to-one correspondence between LSST flags and SDSS flags, including their meaning?

---

<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 9, 2016, 4:26am UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/9 "2016-08-09T04:26:04Z")

</div>

We’ll have an equivalent page listing all flags along with tutorials looking at how filtering against different flags influences an analysis given real data.

[DM-6655](https://jira.lsstcorp.org/browse/DM-6655) is the ticket for this that @parejkoj originally created.

---

<div class="post-metadata">

**Author:** ![RHL](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/rhl/32/25_2.png) [@RHL](https://www.rubin.community/u/RHL)\
**Post date:** [August 10, 2016, 7:00pm UTC](https://www.rubin.community/t/handling-deblended-objects-in-catalogs/1007/10 "2016-08-10T19:00:43Z")

</div>

No, but some are cognate.
