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

Support non-zero image XY0 for PeakLikelihoodFluxAlgorithm

    XMLWordPrintable

    Details

      Description

      The PeakLikelihoodFluxAlgorithm in meas_base appears to support non-zero image XY0, and the check on line 210 uses the XY0 correctly:

      if (!geom::Box2D(mimage.getBBox()).contains(center)) {
              std::ostringstream os;
              os << "Center = " << center << " not in exposure bbox" << mimage.getBBox();
              throw LSST_EXCEPT(pex::exceptions::RangeError, os.str());
      

      However, when the index of the center pixel of the source is calculated a few lines down with:

      std::pair<int, double> const xCtrPixParentIndFrac = afw::image::positionToIndex(center.getX(), true);
      

      It calls afw.image.positionToIndex where on line 44 of imageUtils.h the index of the corner pixel is hard-coded as (0, 0).

      It if it desired behavior that this code only works with images that have XY0 set to (0, 0) we should add a check in PeakLikelihoodFluxAlgorithm (and perhaps other places as well) to catch any non-zero value and throw a useful error. If it is not desired behavior, we should pass XY0 as a keyword to afw.image.positionToIndex or add XY0 to ctrPixParentInd in PeakLikelihoodFluxAlgorithm.

        Attachments

          Issue Links

            Activity

            sullivan Ian Sullivan created issue -
            sullivan Ian Sullivan made changes -
            Field Original Value New Value
            Link This issue blocks DM-34909 [ DM-34909 ]
            sullivan Ian Sullivan made changes -
            Rank Ranked higher
            sullivan Ian Sullivan made changes -
            Assignee Ian Sullivan [ sullivan ]
            sullivan Ian Sullivan made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            sullivan Ian Sullivan made changes -
            Story Points 2 1
            sullivan Ian Sullivan made changes -
            Epic Link DM-36522 [ 2254239 ]
            Sprint AP S23-1 (December) [ 1202 ]
            Team Alert Production [ 10300 ]
            sullivan Ian Sullivan made changes -
            Reviewers Jim Bosch [ jbosch ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            jbosch Jim Bosch made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            sullivan Ian Sullivan made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            sullivan Ian Sullivan made changes -
            Link This issue relates to DM-37438 [ DM-37438 ]

              People

              Assignee:
              sullivan Ian Sullivan
              Reporter:
              sullivan Ian Sullivan
              Reviewers:
              Jim Bosch
              Watchers:
              Ian Sullivan, Jim Bosch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.