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

Footprint.transform may be transforming the wrong position

    Details

    • Type: Story
    • Status: Done
    • Priority: Undefined
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Templates:
    • Story Points:
      1
    • Sprint:
      DRP F17-2
    • Team:
      Data Release Production

      Description

      Footprint.transform contains the following code:

      std::shared_ptr<Footprint> Footprint::transform(geom::XYTransform const& t, ...
          ...
          // now populate the new Footprint with transformed Peaks
          for (auto const& peak : getPeaks()) {
              // Transform the x y Point
              auto newPoint = t.forwardTransform(geom::Point2D(peak.getFx(), peak.getFx()));
              newFootprint->addPeak(newPoint.getX(), newPoint.getY(), peak.getPeakValue());
          }
      

      I strongly suspect it should be transforming Fx, Fy instead of Fx, Fx. If so, the code would be simpler and less error-prone as:

      auto newPoint = t.forwardTransform(peak.getF());
      

      In the same vein: a variant of addPeak that took a Point2D for the position would be a useful addition.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  nlust Nate Lust
                  Reporter:
                  rowen Russell Owen
                  Reviewers:
                  Russell Owen
                  Watchers:
                  Nate Lust, Russell Owen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel