LSSTDESC / dia_pipe

Difference Image Analysis pipeline using LSST DM Science Pipelines developed for DESC Data Challenges
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Understand offset between standard photometry and forced photometry in difference images. #20

Closed rearmstr closed 3 years ago

rearmstr commented 4 years ago

@shuliu2017 has reported that there is ~0.005 mag offset between psf flux measurements on difference images and forced psf flux measurements. This is seen in both injected sources and regular sources.

rearmstr commented 4 years ago

Here is a plot from @shuliu2017 on the fractional difference between the two flux measurerments.

image

In some cases the offset looks fairly consistent for a single visit, but not for others.

BrunoSanchez commented 4 years ago

What is the relationship with the errors?

rearmstr commented 3 years ago

@shuliu2017 were you able to confirm that this offset was due to aperture corrections?

shuliu2017 commented 3 years ago

@rearmstr not yet. I have compared the residuals of forced flux vs. injected flux and diaSrc flux vs. injected flux. I find the forced flux agrees to the injected flux better than the diaSrc flux. To confirm whether it is caused by the aperture correction, I want to confirm two questions:

1. Is aperture correction only applied to the forced flux? 
2. Should I apply base_PsfFlux_instFlux/base_PsfFlux_apCorr to get the uncorrected flux?
rearmstr commented 3 years ago

The answer is yes to both of your questions.

rearmstr commented 3 years ago

Shu has confirmed that the difference is in the aperture correction. I am closing this issue.

wmwv commented 3 years ago

Giving the title, I agree that this can be formally closed. But I feel that we should then open a very related issue: "How should we get aperture-corrected photometry into the DIA source tables?"

rearmstr commented 3 years ago

I'm not sure this is a dia_pipe issue since we use the image difference code from the stack. I'm not opposed to opening a new issue, but if that is a feature we want, it seems like we need to through DM channels.

wmwv commented 3 years ago

Good point, @rearmstr . I've opened #21 to try to come up with the test case to share with DM and optimistically maybe we'll figure it out just by creating the test case.