cds-astro / aladin-lite

An astronomical HiPS visualizer in the browser
https://aladin.cds.unistra.fr/AladinLite/
GNU General Public License v3.0
103 stars 42 forks source link

Feature request: colourbar with numerical scale #157

Open bmiszalski opened 6 months ago

bmiszalski commented 6 months ago

Hi all, A feature that would be really useful would be the ability to show a colorbar and scale (even if min/max values) like e.g. https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.colorbar.html

Some example usage would be to plot velocity maps on top of galaxies, where the maps are the outputs of IFU surveys. The colourbar would show the min/max velocities. It would be nice if it could make use of BUNIT in the FITS header if possible (e.g. to display the units somewhere).

Please see attached images and html. This uses some SAMI DR3 data and the fits2hips service to create an overlay that is adjustable via a transparency slider. The code is a little old now (uses Aladin Lite v2), but should be functional.

HTML source for an example and screenshots available here: https://cloud.datacentral.org.au/s/Hc0zbCdu8tmDABd

Best regards, Brent.

Screenshot 2024-05-20 at 3 18 35 pm Screenshot 2024-05-20 at 3 18 23 pm
bmiszalski commented 6 months ago

I've also added some Python code to the above link.

bmiszalski commented 6 months ago

This is a mock up of what it might look like:

colourbar