-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Mosviz redshift slider #982
Conversation
2aee125
to
4b1c1ef
Compare
Codecov Report
@@ Coverage Diff @@
## main #982 +/- ##
==========================================
+ Coverage 70.49% 72.63% +2.14%
==========================================
Files 74 74
Lines 5422 5576 +154
==========================================
+ Hits 3822 4050 +228
+ Misses 1600 1526 -74
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
* row stores values, and assigned to spectrum when changing row (could be optimized to avoid caching and 0 flashing) * mosviz.get_spectrum_1d/2d helper methods to access underlying spectra in ANY row with or without applied redshift * minimal support for RV switch in slider (values do not match exactly when changing switch, no RV column in table)
so that all load data calls can make use of this, including those that call super().load_data. Multiple load_data calls will update the values from the underlying spectra (so may overwrite user-changes). In theory all data loading should be done in advance of making changes.
4b1c1ef
to
98caa05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work but can be improved with the following:
- Add some user-facing documentation on the new UI improvement and also the two new public methods mentioned in change log.
- When calling
mosviz.get_spectrum_1d()
andmosviz.get_spectrum_2d()
, I see a warning that saysWARNING:root:Warning: Applying the value from the redshift slider to the output spectra. To avoid seeing this warning, explicitly set the apply_slider_redshift argument to True or False.
, which is very confusing because I am calling the methods using default parameters, which are usually the recommended ones. Suggest change the default into something that does not produce a warning (unless this is what PO wanted...). - Is blueshift not supported at all? Don't some lines get blueshifted in some scientific situations?
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
* API docs are likely broken by the deprecation of MosViz (vs Mosviz).
Added basic information (and link to the Specviz redshift docs) in 8470c01. Let me know if you think anything is missing that needs to be there.
This is to mirror the behavior of
Blueshift should be supported, but will need to currently be entered manually as otherwise the lower limit of the slider is always zero/positive. This case should be a consideration if/when redesigning the slider (relevant to #987). |
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
I'll approve when tests are added. 😉 |
4974133
to
ed31fd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, everything seems to be behaving and performing well. The only thing I think might trip some people up is if they wanted to set the redshift for all the rows - it might be nice to have an option to set row='all'
in the mosviz.update_column
call to do that without needing to construct an array of the correct length. But I don't think that should hold up the PR, so I'm going to approve and if you want to implement that now I can take another look before merging.
@pllim There are tests now, do you approve? 😁 |
Thanks! |
Description
This pull request is an extension of #961 and adds a redshift slider in Mosviz along with new
mosviz.get_spectrum_1d(row=None)
andmosviz.get_spectrum_2d(row=None)
(defaults to the currently selected row ifrow
is not provided) helper methods to access the underlying data products with their respective redshifts applied.Note: support for RVs in the slider dropdown is supported, but roundtripping is not perfect. Support for an RV column in the table connected to the slider is not (currently) included.
This also currently includes #980 (which would preferably be merged first and then this PR rebased onto main)
Wishlist:
hide_column
logic).if RV column is within scope: design and implementChecklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.CHANGES.rst
?