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

SourceDetectionTask behaves inconsistently for different thresholdTypes

    XMLWordPrintable

    Details

      Description

      Erin Sheldon reports (and Eli Rykoff concurs) that SourceDetectionTask behaves inconsistently when thresholdType=variance vs. thresholdType=stdev; the latter uses an empirical estimate of the variance from some image (I'm not sure whether it's the Gaussian-smoothed image or the original) while the former uses the variance plane of the other image.

      We want SourceDetectionTask to yield 5-sigma point-source SNR detections on the original image regardless of the thresholdType, and need to fix whichever of these is incorrect (strongly suspected to be thresholdType=variance, but I need to re-do the detection algebra and look harder at the code to be sure).  If we can't change the meaning of a thresholdType without lots of breakage, we should add a new one with the desired behavior and update the docs (and probably deprecate the confusing one).

        Attachments

          Activity

          Hide
          nlust Nate Lust added a comment -

          Looking at the code, I am pretty sure they are both operating on the post convolved image. There may be something else going on that makes them inconsistent, and I am reading through things now.

          Show
          nlust Nate Lust added a comment - Looking at the code, I am pretty sure they are both operating on the post convolved image. There may be something else going on that makes them inconsistent, and I am reading through things now.
          Hide
          nlust Nate Lust added a comment -

          I suspect if there are differences seen, it is because doing things with stdev masks out pixels before doing the stats calculations, and the variance path does not, so their estimates probably are pretty different.

          If this is the case there are 2 options I see. Pass the config values for the ignore masks through to c++ and then configure the stats to use them, or switch to  doing variance in python like stdev is doing (after someone hacked it this way, ignoring the c++ code path for stdev)

          However, I think there may be some other kind of confusion going on here. The Variance option in the config type does not mean it uses the variance plane for any special type of significance. It is ** basically exactly the same as stdev.

          Show
          nlust Nate Lust added a comment - I suspect if there are differences seen, it is because doing things with stdev masks out pixels before doing the stats calculations, and the variance path does not, so their estimates probably are pretty different. If this is the case there are 2 options I see. Pass the config values for the ignore masks through to c++ and then configure the stats to use them, or switch to  doing variance in python like stdev is doing (after someone hacked it this way, ignoring the c++ code path for stdev) However, I think there may be some other kind of confusion going on here. The Variance option in the config type does not mean it uses the variance plane for any special type of significance. It is ** basically exactly the same as stdev.

            People

            Assignee:
            jbosch Jim Bosch
            Reporter:
            jbosch Jim Bosch
            Watchers:
            Arun Kannawadi, Jim Bosch, John Parejko, Nate Lust
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Jenkins Builds

                No builds found.