spacetelescope / jdaviz

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

Specviz autoscale methods should accomodate multiple datasets #339

Open rosteen opened 4 years ago

rosteen commented 4 years ago

Currently Specviz.autoscale_y scales based only on the "reference" dataset, which is the first loaded into the viewer. It would be better if it did whatever happens when additional datasets are loaded, so that all the data currently displayed in the viewer fits on the plot.

eteq commented 3 years ago

Another option (which I think I prefer?) is to have an always/often-present "rescale" button that does this on demand. But even if we want to go with @rosteen's suggestion, there should be a way to turn the rescaling off because there are some use cases where you want to show a new spectrum without it rescaling.

rosteen commented 3 years ago

Ah that's a good suggestion. Could have a viewer attribute (enable_autorescale?) that's on by default but could be set to False in the notebook. I also have been wanting to add a scale reset button for a while.