Fix Version/s: None
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.
DM-14681 Develop tutorial notebook for LSST@Europe3
- links to
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).
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).
Firefly is updated to display pixel in various coordinate options, including showing the image pixel in FITS convention and using WCSA.
the readout is made by Trey Roby to show image pixel in either FITS convention or zero based style.
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?