Questions about background subtraction and reference catalog

(Shenming Fu) #1

Dear all, I was wondering if I could ask some questions about LSST DM. I was reprocessing DECam archive data with obs_decam in weekly release w_2019_05.

  1. calexps are generated at different steps of the pipeline: processCcd, assembleCoadd, detectCoaddSources, etc. Are those calexp images all background-subtracted (default)? However, I found the config of detectCoaddSources has
# Do temporary wide (large-scale) background subtraction before footprint detection?                               

# Enable temporary local background subtraction? (see tempLocalBackground)                                         

But the config of processCcd has


and the config of assembleCoadd has


Do these mean that the calexps generated by processCcd and assembleCoadd are not background-subtracted? Is the “background subtraction” used for the output catalog or for the generated calexp images?

  1. For reference catalogs (Gaia, PS1, SDSS), which calibrate astrometry and photometry, they are used in processCcd, jointcal, measureCoaddSources. In processCcd, it is given by

In jointcal, it is given by


But in measureCoaddSources, it is only given by (does it include both astrometry and photometry?)


Are processCcd, jointcal, and measureCoaddSources the only three places we should import reference catalog?
A related question is, how to import color terms (to convert color info from reference catalog to DECam)? In processCcd, we have

config.calibrate.photoCal.applyColorTerms = True

But I don’t know how to include them in jointcal and measureCoaddSources configs. Can the color terms for these steps be inherited from processCcd?

Thank you.

(John Parejko) #2

First off, do you have decam colorterms? The alert pipelines group at UW would be very interested to get those into the stack!

Once you have decam colorterms for a given reference catalog (see obs_subaru/configs/hsc/ for a working example), the only change you should need to make to use them with jointcal is to add a line like the following to the decam jointcal config:

config.colorterms.load(os.path.join(getPackageDir("obs_decam"), "config", ""))

(Meredith Rawls) #3

Excellent questions, Shenming! Welcome to the community forums.

For (1), My understanding is that the doTempWideBackground and doTempLocalBackground config settings are for special cases of how to handle background subtraction, and that all calexps (i.e., processed visit images) are typically background subtracted. But maybe others can chime in here with more details about this.

Regarding (2), I have only just realized that obs_decam lacks the color terms you describe. If you have DECam color terms for PS1 reference catalogs, I would be thrilled to add them as @parejkoj describes so we can both use them in processCcd. (Right now I believe it tries to apply color terms, but doesn’t find any, so effectively skips that step.)

(Shenming Fu) #5

Thank you!

I was using DECam color terms (PS1 to DECam) from “grz Photometry” in

I haven’t found other color terms for DECam yet. I will let you know once I find it.

(Shenming Fu) #6

Thank you Meredith! This is my first time to post on community forum. Thanks for your answer to (1). For (2) I only have color terms from Legacy survey’s website. I will try to find other color terms and let you know.

(Jim Bosch) #7

These options are primarily used when detecting on very deep coadd images; they’re different (not mutually exclusive) ways of intentionally, temporarily oversubtracting the wings of real objects in order to make blends smaller. I believe they should both be disabled for single-epoch processing. And even if they are enabled, after detection is completed those subtractions are reverted, so they should only affect the detected footprints, not the final background.

(Еrіс Веⅼⅼⅿ) #8 provides a slightly more comprehensive set of DeCAM-PS1 color terms.