Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Astrowidgets.set_colormap does not handle Monochromatic switch gracefully #1510

Open
Jdaviz-Triage-Bot opened this issue Jul 19, 2022 · 0 comments
Labels
bug Something isn't working imviz

Comments

@Jdaviz-Triage-Bot
Copy link

Jdaviz-Triage-Bot commented Jul 19, 2022

Reporter: pllim

Workflow:

  1. Fire up Imviz example notebook and load the images.
  2. In Plot Options, change Color Mode to Monochromatic (make sure you select the second image, which is what you will be seeing first).
  3. In the notebook cell, run imviz.default_viewer.set_colormap('Viridis') and then observe the state of Plot Options.

@kecnry and I apparently observed different behavior, both which were a little counter-intuitive (either the image does not change back to colormap or it did but Plot Options didn't).

What should be the desired behavior? Kyle presented 3 possible solutions:

  1. Change the colormode on the viewer to colormap and the colormap on the top layer (or all layers?) to whatever is requested
  2. Set the underlying state, but require manually changing the mode. This is what I’d expect, but that’s probably because I know what happens at the low level with the state objects
  3. Raise an error requiring mode to be changed first (or perhaps passing an additional argument to set_colormap)

Kyle: I’d probably vote for 3, because I like error messages and being very clear when some magic is happening. But if 1 is consistent with astrowidget API, then we can make that happen… although its odd that you’re seeing it happen now and I don’t. Nowhere in astrowidgets does that logic exist, so is glue triggering a change to the mode somewhere? Do you actually see the mode dropdown change to "colormaps"?

POs should decide which option would make most sense to a typical scientist user.

Related issues:

🐱


DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working imviz
Projects
None yet
Development

No branches or pull requests

2 participants