Indeed, I will implement the above once DM-28542 lands and is part of a weekly RC2 processing. This point here is to try to get the best set of flags we can based on catalog flag entries prior to that ticket getting merged. To this end, I have updated the sky source selection to only use the non-model isolated scarlet models via a selection on the sky catalog of:
skyObjCat["parent"] == 0 & skyObjCat["deblend_nChild"] == 1
|
. In my first pass at doing this, I noticed that the outer "ring" in the COSMOS 9813 tract was getting selected against. These are the sources without full-band coverage and, if I understand correctly, scarlet falls back to the effective "no model" measurement style for these objects. They get the "deblend_skipped" flag set and can be identified in a sky object-only catalog in that they all have:
skyObjCat["parent"] == 0 & skyObjCat["deblend_nChild"] == 0
|
so I add these back in. Comments in the code have added to make note of this.
The sky object plots do indeed now look much closer to what we were getting with meas_deblender runs. However, there are still offsets to more positive sky measurements in the circular aperture measurements as demonstrated in the following plots:
w06 scarlet:
w06 scarlet this ticket:
w02 meas_deblender:

So, while things look much better, there is still a bias towards higher sky levels in the scarlet no-model plot compared to that of the w02 meas_deblender run.
To rule out the possibility of differences in source placement somehow creeping in, I made plots comparing them between the scarlet-base w06 run and the meas_deblender 02 run. Some examples:
Identical:
small differences:
They are nearly identical (first plot), but with the occasional exception (second plot). I believe these small differences stem from small differences (in particular in the fgcm calibrations) at the visit level stage, leading to slight differences in the mask planes used for source placement selection (and has nothing to do which which deblender was run).
More examples for all patches in tract 9813 can be perused (for some finite amount of time!) here.
So, it seems there is still something "different" about what is getting passed into the measurement algorithms (perhaps a combination of Fred Moolekamp + Lee Kelvin could file a ticket to look into this in more detail?) Totally naïve speculation: are the boxes big enough (but...if not, should the algorithm fail/report NaN for flux? Most entries have the circular aperture flux flags set for both deblender outputs).
I recommend basing this off of
DM-28542, in which case you can just usewhich will give you the unblended isolated sources and the sources from blends with >= 2 children, without any of the restrictions on patch or tract.