# lsst.afw.display.get_display() should raise warning if display_ds9 is not setup

XMLWordPrintable

## Details

• Type: Bug
• Status: To Do
• Resolution: Unresolved
• Fix Version/s: None
• Component/s:
• Labels:

## Description

 # exp is an instance of lsst.afw.image.ExposureF * import lsst.afw.display as display disp = display.getDisplay() disp.mtv(exp) `

runs without any complains or indication about a problem but fails to display anything on ds9, even when it is already open. As Russell Owen pointed out, the problem can be solved by setting up display_ds9 before running the code (other display managers will work too).

It would be nice to log a warning that informs the user of this requirement when disp.mtv is called without any display manager being set up.

## Activity

Hide
Russell Owen added a comment -

I agree. It is a common error to forget to set up a back end for display, and the result is a silent failure to display anything, which is costly in developer time and frustration. I would like to see a warning if the user forgets to (or does not know that they need to) set up a back end package.

If there is a use case for being able to silently display to nothing, then it is fine to offer some way to do that. But it should not be the default, as it is now.

Show
Russell Owen added a comment - I agree. It is a common error to forget to set up a back end for display, and the result is a silent failure to display anything, which is costly in developer time and frustration. I would like to see a warning if the user forgets to (or does not know that they need to) set up a back end package. If there is a use case for being able to silently display to nothing, then it is fine to offer some way to do that. But it should not be the default, as it is now.
Hide
Tim Jenness added a comment -

I think it provides less chance of weirdness if a null display device is requested explicitly rather than implicitly.

To clarify the ticket summary, get_display() getting upset has nothing to do with display_ds9 as the main point of this class is to divorce displays from a dependency on DS9.

Show
Tim Jenness added a comment - I think it provides less chance of weirdness if a null display device is requested explicitly rather than implicitly. To clarify the ticket summary, get_display() getting upset has nothing to do with display_ds9 as the main point of this class is to divorce displays from a dependency on DS9.
Hide
Robert Lupton added a comment -

I'm OK with a warning if the null display is default-configured, but there should be a way for a user to configure the null display device explicitly and get no messages. As Tim Jenness says, there's nothing special about ds9

Show
Robert Lupton added a comment - I'm OK with a warning if the null display is default-configured, but there should be a way for a user to configure the null display device explicitly and get no messages. As Tim Jenness says, there's nothing special about ds9

## People

• Assignee:
Unassigned
Reporter:
Rahul Biswas
Watchers:
Rahul Biswas, Robert Lupton, Russell Owen, Tim Jenness