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

SourceDetectionTask can corrupt image

    XMLWordPrintable

    Details

    • Team:
      Alert Production

      Description

      SourceDetectionTask can silently corrupt the provided exposure by fitting and subtracting an invalid background model that that results in the image being all nans. I believe the task should realize that the background model is invalid and raise an exception in this situation.

      I first saw the problem with an image that had several hundred counts of background. Detection detected a single source and the results were as described. I have attached code demonstrating the issue. Setup `meas_algorithms` and run `showBackgroundBug.py` to see the problem.

        Attachments

          Issue Links

            Activity

            Hide
            price Paul Price added a comment -

            This commonly happens when there are NANs in the image: they get into the background model, and from there to the background image, and then into the background-subtracted image.

            Show
            price Paul Price added a comment - This commonly happens when there are NANs in the image: they get into the background model, and from there to the background image, and then into the background-subtracted image.
            Hide
            rowen Russell Owen added a comment -

            Paul Price the input image has no nans (at least in the image plane; I have not checked the variance plane). But if that is also a known failure mode then it sounds worth testing for it. I do believe that the background model has nans, and I think that should raise an exception.

            Show
            rowen Russell Owen added a comment - Paul Price the input image has no nans (at least in the image plane; I have not checked the variance plane). But if that is also a known failure mode then it sounds worth testing for it. I do believe that the background model has nans, and I think that should raise an exception.
            Hide
            tjenness Tim Jenness added a comment -

            Is this still a problem? 6 years now...

            Show
            tjenness Tim Jenness added a comment - Is this still a problem? 6 years now...
            Hide
            jbosch Jim Bosch added a comment -

            I think it's still a problem in the sense that SourceDetectionTask should do some kind of input validation and/or check on its outputs to guard against this case, even if we can't run the how-to-reproduce.  To be clear, I don't think it's SourceDetectionTask's job to succeed when it's given an image with a significant background, but it should fail gracefully (as the ticket describes), and I don't think that's hard to do, or at least try to do, even without testing.

            I'm adding the PairCoding label to this to try to get it noticed and done.

            Show
            jbosch Jim Bosch added a comment - I think it's still a problem in the sense that SourceDetectionTask should do some kind of input validation and/or check on its outputs to guard against this case, even if we can't run the how-to-reproduce.  To be clear, I don't think it's SourceDetectionTask's job to succeed when it's given an image with a significant background, but it should fail gracefully (as the ticket describes), and I don't think that's hard to do, or at least try to do, even without testing. I'm adding the PairCoding label to this to try to get it noticed and done.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rowen Russell Owen
              Watchers:
              Jim Bosch, John Parejko, Paul Price, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.