spacetelescope / jdaviz

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

Low-value/high-precision redshifts cannot be entered by hand #436

Open eteq opened 3 years ago

eteq commented 3 years ago

@alechirschauer encountered this while testing some things on specviz. It appears the redshift slider has some sort of fixed-precision such that when one types 0.0021, it re-sets it to 0.002. For low-redshift situations, it's not at all uncommon to care at the level of .0001 or even .00001. (Beyond that I'm guessing people switch to RV mode, but the best thing is probably to have the precision be dynamic in the sense that when a use enters a redshift by hand, the precision should be whatever they type in).

rosteen commented 3 years ago

You can increase the precision with e.g. specviz.set_redshift_slider_bounds(step=0.00001) (you can also use that method to set the upper and lower bounds). There seems to be a hard limit to the precision available in the vuetify slider, I think it's either 5 decimal places so at that point you would need to switch to RV to be more precise. I'm not sure off the top of my head how we could update the step dynamically if needed based on the input value, but I'm pretty sure it could be done. The slider/input box interaction is a little finicky.