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

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

    Details

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

      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.

        Attachments

          Issue Links

            Activity

            Hide
            rowen 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
            rowen 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
            tjenness 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
            tjenness 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
            rhl 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
            rhl 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:
                rbiswas Rahul Biswas
                Watchers:
                Rahul Biswas, Robert Lupton, Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel