legacysurvey / legacypipe

Image reduction pipeline for the DESI Legacy Imaging Surveys, using the Tractor framework
BSD 3-Clause "New" or "Revised" License
37 stars 22 forks source link

Nonzero pixels in coadds where (nexp==0) and (ivar==0) #674

Closed rongpu closed 3 years ago

rongpu commented 3 years ago

A few bricks in the DR9 coadds have many (>1000) pixels that have (nexp==0) & (ivar==0) & (img!=0), even after excluding the saturated and allmask pixels (maskbits 0, 2, 3, 4, 5, 6, 7).

Two examples: g-band image of 0168m415 (nonzero pixels at the center of a very bright star) r-band image of 3125p095 (hundreds of smaller blobs of nonzero pixels)

I'm not sure if the nonzero values are caused by the "cosky" procedure (mentioned in Dustin's email on Dec 24). It's probably harmless and might not be an real issue. So please feel free to close this issue.

dstndstn commented 3 years ago

Aside from the 'cosky' bug, I think this is intentional; at this point, we patch the invvar-weighted coadds with data from unweighted coadds, which are a little more generous in including dubious pixels if no other data are available:

https://github.com/legacysurvey/legacypipe/blob/main/py/legacypipe/coadds.py#L584

and

https://github.com/legacysurvey/legacypipe/blob/main/py/legacypipe/coadds.py#L428

As you say, I think these are ~harmless, so I'm going to close this ticket for now.