spacetelescope / jdaviz

JWST astronomical data analysis tools in the Jupyter platform
https://jdaviz.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
142 stars 74 forks source link

[FEAT] Cubeviz: Allow collapsed spectra to use different functions #1492

Open rosteen opened 2 years ago

rosteen commented 2 years ago

Currently, changing the collapse function for one spectrum shown in the spectrum viewer changes the function for all collapsed spectra. It would be nice to be able to choose different functions for different spectra. This may require some upstream work, since I believe that currently the collapse function is a property of the spectrum viewer itself rather than a property attached to the individual layers/data.

kecnry commented 2 years ago

One option to do this might be to re-enable spatial collapsing in the plugin to create a (static) spectrum with a fixed collapse function (that then does not update to changes in the viewer's collapse function or the spatial regions). Would that be enough for the use case you have in mind?