-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement unit conversion in specviz2d #3253
base: main
Are you sure you want to change the base?
Changes from all commits
7152a2d
274c917
5ba84a7
f137213
640cd62
58516a0
124d829
a025530
35d7733
aad7c6f
acd3693
72dbf9d
05ca476
e86342b
b0ed10b
fdb6a5d
b538d1e
556b66f
0758920
bb956cc
e08cf1f
0a3a171
c838bd5
c11a3c3
62998b5
f170224
b481be1
320d8c8
9e031c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -222,8 +222,11 @@ def test_load_single_image_multi_spec(mosviz_helper, mos_image, spectrum1d, mos_ | |||||||||
|
||||||||||
label_mouseover._viewer_mouse_event(spec2d_viewer, | ||||||||||
{'event': 'mousemove', 'domain': {'x': 10, 'y': 100}}) | ||||||||||
|
||||||||||
# Note: spectra2d Wave loaded in meters, but we respect one spectral unit, so the meters in | ||||||||||
# converted to Angstrom (the spectra1d spectral unit). | ||||||||||
Comment on lines
+226
to
+227
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this a little more? Is it that a previous data entry was in angstroms or just that that is the default spectral display unit?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the loaded 1D and 2D spectra have different native spectral units, with one in meters and one in angstroms and app-wide we're respecting one choice for spectral unit. |
||||||||||
assert label_mouseover.as_text() == ('Pixel x=00010.0 y=00100.0 Value +8.12986e-01', | ||||||||||
'Wave 1.10000e-05 m', '') | ||||||||||
'Wave 1.10000e+05 Angstrom', '') | ||||||||||
assert label_mouseover.icon == 'c' | ||||||||||
|
||||||||||
# need to trigger a mouseleave or mouseover to reset the traitlets | ||||||||||
|
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.
where were these handled before (I don't see them in the else 🤔)?
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.
X-axis conversions were not previously handled in Specviz2d, so they were previously always using the native units and value when mousing over