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

Forced photom incorrect in mosaic & 90prime south of dec=32.375 #524

Open djschlegel opened 4 years ago

djschlegel commented 4 years ago

Michael Wood-Vasey has reported at least one DR8 mosaic forced-photometry file where the agreement with the tractor catalogs is terrible, with generally a 0.75 mag offset: dr8/forced/mosaic/00149/forced-mosaic-149184.fits The corresponding image had CCD_CUTS=0 and looks good: cosmo/staging/mosaic/CP/V4.1/CP20171125/k4m_171126_045243_ooi_zd_v1.fits.fz

I've looked at a handful of other forced photometry files on all 3 cameras where I don't see this problem and there's very good agreement with the tractor catalogs. One mosaic example that is good: dr8/forced/mosaic/16012/forced-mosaic-160125110657.fits

djschlegel commented 4 years ago

I've checked a random-sampling of 1000 mosaic single-epoch forced photometry. They are always good at dec > 32.375 deg, and always bad at lower declinations, so this must be some sort of book-keeping problem where perhaps the forced photometry is using the wrong files at the lower declinations?

Listed below is a sampling of problem cases and the median difference between the single-epoch and tractor catalog.

EXPNUM CCD Mag-diff 101308 CCD1 3.93456 101308 CCD2 3.25368 101308 CCD3 4.07273 101308 CCD4 1.72209 101540 CCD1 0.768671 101540 CCD2 0.894497 101540 CCD3 0.752781 101540 CCD4 0.779743 119005 CCD1 3.39519 119005 CCD2 1.40635 119005 CCD3 3.40044 119005 CCD4 1.79047 122746 CCD1 3.68932 122746 CCD3 3.93545 139225 CCD1 0.770323 139225 CCD2 0.764360 139225 CCD3 0.773647 139225 CCD4 0.756937 139233 CCD1 0.785521 139233 CCD2 0.779568 139233 CCD3 0.766539 139233 CCD4 0.758146

djschlegel commented 4 years ago

More info: both mosaic & 90prime single-epoch photometry shows these problems at dec < 32.375 deg. Here some some example 90prime single-epoch photometry files that show offsets:

EXPNUM CCD FILTER Mag-diff 74050260 CCD1 r 4.33367
74050260 CCD2 r 4.46581 74050260 CCD3 r 4.84945 74050260 CCD4 r 4.69170 76980049 CCD1 g 0.765493 76980049 CCD2 g 0.762674 76980049 CCD3 g 0.766876 76980049 CCD4 g 0.749706

I compared to north/tractor and south/tractor files, and the behavior is the same comparing to either (as expected). That does raise the question though of whether the 90prime & mosaic single-epoch photometry should draw from the tractor files in north/tractor or south/tractor. I would argue they should use the north/tractor.