Refactor the image display code to remove explicit references to ds9

XMLWordPrintable

Details

• Type: RFC
• Status: Implemented
• Resolution: Done
• Component/s:
• Labels:
None
• Location:
PR

Description

The current stack image display code assumes that you're talking to ds9:

 import lsst.afw.display.ds9 as ds9   ds9.erase()

As the IPAC team thinks about supporting firefly, and ginga gains traction in the scipy world, we need replace this interface with something more general.

In the longer run we need to decide what APIs we need to support, but this is hard to do until we have more than one backend. This RFC proposes that we change the interface to something like:

 import lsst.afw.display.imdisplay as imdisplay imdisplay.setBackend('ds9')   imdisplay.erase()

It would be possible to hoist these methods to lsst.afw.display itself:

 import lsst.afw.display as afwDisplay afwDisplay.setBackend('ds9')   afwDisplay.erase()

A discussion of the pros and cons is in scope for the RFC.

The choice of backend (in this case ds9) should be configurable either explicitly, as illustrated here, or via some deus ex machina technique (a dot file, an environment variable, ...). I put the backend choice explicitly in the examples, but I would not expect this to appear in utility code.

People

• Assignee:
Robert Lupton
Reporter:
Robert Lupton
Watchers:
Frossie Economou, Gregory Dubois-Felsmann, Jim Bosch, John Swinbank, Michael Wood-Vasey, Robert Lupton, Russell Owen, Tim Jenness, Xiuqin Wu