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

Add API to afwDisplay.Display to select the colour map

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Templates:
    • Team:
      Data Release Production

      Description

      Alex Drlica-Wagner has added a facility to set the colour map in display_matplotlib;  this makes sense, but should be pulled up to the afwDisplay level.  Because we'd implement a dummy version of the API in interface.py there would be no immediate need for other backends to support this immediately.  The proposed API is:

       display.setImageColormap(name)

      where name is a string;  the only one I see in common between ds9 and matplotlib is "gray" and "viridis" (which firefly doesn't understand) so it is probably not worth trying to come up with a set of standard names beyond "gray".

      The interpretation of "name" is backend specific;  for matplotlib I propose that we interpret it as pyplot.cm.name.  If name is invalid, we should attempt to interpret it as a colormap and use it directly (or possibly vice-versa).  For ds9 I'll pass it to an xpa cmap command and trap errors. I leave it up to IPAC to make suitable choices for firefly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rhl Robert Lupton
                Reporter:
                rhl Robert Lupton
                Reviewers:
                David Shupe
                Watchers:
                David Shupe, Robert Lupton
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel