Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-28498

psFlux is biased in difference images.

    XMLWordPrintable

    Details

    • Sprint:
      AP S21-3 (February)
    • Team:
      Alert Production
    • Urgent?:
      No

      Description

      During the quick look into DM-20749, it was found that the psFlux measured on the difference image is slightly biased with respect to the truth from inserted fakes. Below are two plots from the ccds used in the COSMOS HSC ap_verify dataset showing that the bias varies from ccd to ccd and seems to be a roughly constant as a function of inserted magnitude.

      This is as opposed to the apFlux which does seem to recover the inputted flux.

        Attachments

          Issue Links

            Activity

            Hide
            cmorrison Chris Morrison [X] (Inactive) added a comment -

            Thanks. Also a quick question, is this something standard we should expect to do for all point source flux measurements in the stack? I ask because downstream from this measure are 2 more psFlux measurements in the form of: psFlux measurements on the calexp at the location of the detected DiaSource; psFlux measurements as part of the DiaForcedSource forced measurement at the location of a DiaObject.

            If that's the case, go ahead and create another ticket triggered on this one (feel free to assign it to me for now) to implement the apCorr on those two fluxes.

            Show
            cmorrison Chris Morrison [X] (Inactive) added a comment - Thanks. Also a quick question, is this something standard we should expect to do for all point source flux measurements in the stack? I ask because downstream from this measure are 2 more psFlux measurements in the form of: psFlux measurements on the calexp at the location of the detected DiaSource; psFlux measurements as part of the DiaForcedSource forced measurement at the location of a DiaObject. If that's the case, go ahead and create another ticket triggered on this one (feel free to assign it to me for now) to implement the apCorr on those two fluxes.
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            Yes, this aperture correction needs to be done at each of the steps.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - Yes, this aperture correction needs to be done at each of the steps.
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment - - edited

            I attach an analysis Shu Liu put together testing out the new branch for 10 different visits from DC2.

            pipe_tasks_apcorr.pdf

            This confirms that this change improves and corrects the agreement between injected sources and diaSrc psFlux measurements.

            The first slide shows a separate plot for for each branch for one visit.

            The next slide plots the comparison for 10 different visits.

            And then there are plots that compare the diaSrc to the forced photometry that dia_pipe runs on the DIA exposures based on the DIAObjects from the association. The forced photometry itself has always agreed with the injected flux.

            The final plot is a comparison of the differences between diaSrc measurements and the forced photometry (which is equivalent to the diaSrc measurements vs. the injected). The left plot shows the distribution of the flux difference divided by the uncertainty (i.e., the "pulls") compared to the expected normal distribution for sigma=1, the right shows the now perfect agreement.

            An explanatory note about the labeling:
            Because DC2 was done with 20.0.0 this testing is done with the u/wmwv/dia_apcorr branch, which is the exact same changes as between current master and tickets/DM-28498, but is off 20.0.0 instead of master.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - - edited I attach an analysis Shu Liu put together testing out the new branch for 10 different visits from DC2. pipe_tasks_apcorr.pdf This confirms that this change improves and corrects the agreement between injected sources and diaSrc psFlux measurements. The first slide shows a separate plot for for each branch for one visit. The next slide plots the comparison for 10 different visits. And then there are plots that compare the diaSrc to the forced photometry that dia_pipe runs on the DIA exposures based on the DIAObjects from the association. The forced photometry itself has always agreed with the injected flux. The final plot is a comparison of the differences between diaSrc measurements and the forced photometry (which is equivalent to the diaSrc measurements vs. the injected). The left plot shows the distribution of the flux difference divided by the uncertainty (i.e., the "pulls") compared to the expected normal distribution for sigma=1, the right shows the now perfect agreement. An explanatory note about the labeling: Because DC2 was done with 20.0.0 this testing is done with the u/wmwv/dia_apcorr branch, which is the exact same changes as between current master and tickets/ DM-28498 , but is off 20.0.0 instead of master .
            Hide
            cmorrison Chris Morrison [X] (Inactive) added a comment -

            Thanks for taking care of this and producing the plots Shu and Michael. I'm making this as reviewed. Feel free to merge.

            Show
            cmorrison Chris Morrison [X] (Inactive) added a comment - Thanks for taking care of this and producing the plots Shu and Michael. I'm making this as reviewed. Feel free to merge.
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            Merged to master.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - Merged to master.

              People

              Assignee:
              wmwood-vasey Michael Wood-Vasey
              Reporter:
              cmorrison Chris Morrison [X] (Inactive)
              Reviewers:
              Chris Morrison [X] (Inactive)
              Watchers:
              Chris Morrison [X] (Inactive), Eric Bellm, Ian Sullivan, Michael Wood-Vasey, Paul Price
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.