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

Pixel coordinates off by half in Firefly relative to LSST conventions

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Firefly
    • Labels:
    • Story Points:
      2
    • Sprint:
      SUIT Sprint 2018-06
    • Team:
      Science User Interface

      Description

      When using lsst.afw.display.dot with the Firefly backend, positions appear at a half-pixel offset from where they should; LSST convention is to label the center of the lower-left pixel (0, 0).

      I also see the same half-pixel offset in the mouse pixel coordinates displayed in the upper right corner of the Firefly GUI, so I'm guessing this is just because Firefly (presumably) using a coordinate convention in which integers are pixel boundaries rather than pixel centers.  If it's possible to address that, it'd be very nice to also include the "xy0" offset our image objects carry as well (note that dot already takes care of this offset correctly, presumably by removing it in Python before passing the position to Firefly).

      I'd really appreciate a quick fix so I don't have to work around this in the tutorial notebooks for LSST@Europe3 next week.   If the only short-term options is a workaround for dot in the display_firefly Python code, I can do that much myself; please let me know if I should.

        Attachments

          Issue Links

            Activity

            Hide
            shupe David Shupe added a comment -

            Jim Bosch do I understand that in ds9, the LSST xy0 convention is implemented in WCS a? After reading the HCS-I coadd into ds9, the lower-left-hand pixel is 1, 1 in Image; 15901, 15901 in Physical; and 15900, 15900 in WCS a. It's the WCS a that Firefly needs to handle?

            Show
            shupe David Shupe added a comment - Jim Bosch do I understand that in ds9, the LSST xy0 convention is implemented in WCS a? After reading the HCS-I coadd into ds9, the lower-left-hand pixel is 1, 1 in Image; 15901, 15901 in Physical; and 15900, 15900 in WCS a. It's the WCS a that Firefly needs to handle?
            Hide
            jbosch Jim Bosch added a comment -

            To be more precise:

             - LSST: center of lower-left pixel is (x0, y0), where both x0 and y0 are integers, and they are frequently (0, 0).  So lower-left corner of the image is most often (-0.5, -0.5), but may be any half-integer value.

             - FITS: center of lower-left pixel is (1, 1), so lower-left corner of the image is (0.5, 0.5).

             - Firefly current behavior: center of lower-level pixel is (0.5, 0.5), so lower-left corner of the image is (0.0, 0.0).

             

            Show
            jbosch Jim Bosch added a comment - To be more precise:  - LSST: center of lower-left pixel is (x0, y0), where both x0 and y0 are integers, and they are frequently (0, 0).  So lower-left corner of the image is most often (-0.5, -0.5), but may be any half-integer value.  - FITS: center of lower-left pixel is (1, 1), so lower-left corner of the image is (0.5, 0.5).  - Firefly current behavior: center of lower-level pixel is (0.5, 0.5), so lower-left corner of the image is (0.0, 0.0).  
            Hide
            jbosch Jim Bosch added a comment -

            Yes, if Firefly switches to FITS conventions and then reads and uses WCSA for both pixel coordinate display and Display.dot, I believe that would fix everything (though you may have to back out some other accounting for xy0 in Display.dot that seems to already exist).

            Show
            jbosch Jim Bosch added a comment - Yes, if Firefly switches to FITS conventions and then reads and uses WCSA for both pixel coordinate display and Display.dot , I believe that would fix everything (though you may have to back out some other accounting for xy0 in Display.dot that seems to already exist).
            Hide
            cwang Cindy Wang [X] (Inactive) added a comment -

            Firefly is updated to display pixel in various coordinate options, including showing the image pixel in FITS convention and using WCSA. 

             

            Show
            cwang Cindy Wang [X] (Inactive) added a comment - Firefly is updated to display pixel in various coordinate options, including showing the image pixel in FITS convention and using WCSA.   
            Hide
            cwang Cindy Wang [X] (Inactive) added a comment -

            the readout is made by Trey Roby to show image pixel in either FITS convention or zero based style. 

            Show
            cwang Cindy Wang [X] (Inactive) added a comment - the readout is made by Trey Roby to show image pixel in either FITS convention or zero based style. 

              People

              Assignee:
              cwang Cindy Wang [X] (Inactive)
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              David Shupe, Tatiana Goldina, Trey Roby
              Watchers:
              Cindy Wang [X] (Inactive), David Shupe, Gregory Dubois-Felsmann, Jim Bosch, Tatiana Goldina, Tim Jenness, Trey Roby, Xiuqin Wu [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.