Fix Version/s: None
To improve performance of image display in Firefly, allow an afwDisplay instance with the Firefly backend to track display.scale and display.pan settings that precede display.mtv, and apply these at the time of image display. Also add a small correction to the pan method so that it uses the LSST pixel coordinate convention.
Modify the display_firefly backend to remember the results of scale (stretch) commands, and to apply scale and pan parameters when displaying an image with lsst.afw.display.mtv.
- Remember and apply the serialized RangeValues string that Firefly uses
- Correct pan command by 0.5 pixels to follow LSST convention
- Apply the remembered pan position when using mtv
- Make 'slate.html' the default if it is not passed explicitly or if the environment variable FIREFLY_HTML is not defined. This is necessary for Firefly to show readout of LSST pixel convention.
- is blocked by
DM-15215 Provide parameters for initial pan position in pixels when displaying image
- is contained by
DM-14736 API for combined display-zoom-pan operation for Firefly
- To Do
- relates to
DM-14734 Allow zoom to be set before mtv in afw Displays for Firefly backend
- links to
There is a complication to storing the pan position. The afw.display interface subtracts the XY0 point before sending the pan coordinates to the backend, when origin=afwImage.PARENT (the default). If a display is initialized and a pan command is sent before an mtv command, the backend does not know the XY0 point and it pans to the wrong location.
There is not an easy fix for this, except for users to be aware that if they specify the pan position before the mtv, they need to specify origin=afwImage.LOCAL in their pan or zoom command. zoom can take a pan position in addition to the zoom factor.
Completed and tested, with the caveat that a pan command before an image display should be made from afw.display with origin=afwImage.LOCAL.
Remembering the most recent pan() command was implemented in