WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
105 stars 35 forks source link

Implemented API to use colormaps with images #244

Closed astrofrog closed 5 years ago

astrofrog commented 5 years ago

This is a work in progress - the aim is to implement support for using custom colormaps with images. At the moment, I'm not 100% happy with the API because I think we should make it so that we can update the colormap separately from min/max/scale. I'm also not happy with the repeated/identical code, so I'll work on all this further. But just pushing this here to not lose track of it!

Here's a preview of using this with PyWWT though to show that it works with a Matplotlib colormap:

Annotation 2019-09-06 181309

Note that this includes commits from https://github.com/WorldWideTelescope/wwt-web-client/pull/238 as it uses the same colormap class, so https://github.com/WorldWideTelescope/wwt-web-client/pull/238 should be resolved/merged first anyway.

astrofrog commented 5 years ago

This is now ready for review! As discussed with @pkgw, tour files produced from the web client that use the colormap will lose the colormap when read into the Windows client (for now). Getting this to work might not be worth the effort and not be critical, and it might be more important to just make sure that going forward the Windows client understands colormaps.