diff --git a/jdaviz/configs/default/plugins/markers/tests/test_markers_plugin.py b/jdaviz/configs/default/plugins/markers/tests/test_markers_plugin.py index eeb97618fa..d2c445b310 100644 --- a/jdaviz/configs/default/plugins/markers/tests/test_markers_plugin.py +++ b/jdaviz/configs/default/plugins/markers/tests/test_markers_plugin.py @@ -77,7 +77,7 @@ def test_markers_cubeviz(tmp_path, cubeviz_helper, spectrum1d_cube): {'event': 'mousemove', 'domain': {'x': 4.623e-7, 'y': 0}}) - assert label_mouseover.as_text() == (f'Cursor 4.62300e-07, 0.00000e+00 Value +8.00000e+00 {sb_unit}', + assert label_mouseover.as_text() == (f'Cursor 4.62300e-07, 0.00000e+00 Value +8.00000e+00 {sb_unit}', # noqa 'Wave 4.62280e-07 m (0 pix)', f'Flux 2.80000e+01 {flux_unit}') assert label_mouseover.as_dict() == {'data_label': 'Spectrum (sum)', @@ -103,7 +103,7 @@ def test_markers_cubeviz(tmp_path, cubeviz_helper, spectrum1d_cube): {'event': 'mousemove', 'domain': {'x': 4.623e-7, 'y': 0}}) - assert label_mouseover.as_text() == (f'Cursor 4.62300e-07, 0.00000e+00 Value +8.00000e+00 {sb_unit}', + assert label_mouseover.as_text() == (f'Cursor 4.62300e-07, 0.00000e+00 Value +8.00000e+00 {sb_unit}', # noqa '', '') assert label_mouseover.as_dict() == {'axes_x': 4.623e-07, 'axes_x:unit': 'm', diff --git a/jdaviz/configs/default/plugins/viewers.py b/jdaviz/configs/default/plugins/viewers.py index 40d33a082f..a2383315c1 100644 --- a/jdaviz/configs/default/plugins/viewers.py +++ b/jdaviz/configs/default/plugins/viewers.py @@ -772,9 +772,10 @@ def set_plot_axes(self): locally_defined_sb_units = [un / solid_angle_unit for un in locally_defined_flux_units] # create an equivalency for each flux unit for flux <> flux/pix2. - # for similar reasons to the 'untranslatable units' issue, custom equivalencies can't be combined, - # so a workaround is creating an equivalency for each flux that may need an additional equiv. - angle_to_pixel_equivs = [_eqv_sb_per_pixel_to_per_angle(un) for un in locally_defined_flux_units] + # for similar reasons to the 'untranslatable units' issue, custom + # equivs. can't be combined, so a workaround is creating an eqiv + # for each flux that may need an additional equiv. + angle_to_pixel_equivs = [_eqv_sb_per_pixel_to_per_angle(un) for un in locally_defined_flux_units] # noqa if any([y_unit.is_equivalent(unit, angle_to_pixel_equivs[i]) for i, unit in enumerate(locally_defined_sb_units)]): # noqa flux_unit_type = "Surface Brightness" diff --git a/jdaviz/configs/specviz/plugins/unit_conversion/unit_conversion.py b/jdaviz/configs/specviz/plugins/unit_conversion/unit_conversion.py index 067e4b744b..bc4bf3eb9f 100644 --- a/jdaviz/configs/specviz/plugins/unit_conversion/unit_conversion.py +++ b/jdaviz/configs/specviz/plugins/unit_conversion/unit_conversion.py @@ -343,7 +343,6 @@ def _translate(self, flux_or_sb=None): # Surface Brightness -> Flux if spec_axis_ang_unit and flux_or_sb == 'Flux': - print(f'translating SB to flux. spec_units = {spec_units}, angle={selected_display_solid_angle_unit}') spec_units *= selected_display_solid_angle_unit print('new spec_units = ', spec_units) # update display units @@ -351,7 +350,6 @@ def _translate(self, flux_or_sb=None): # Flux -> Surface Brightness elif (not spec_axis_ang_unit and flux_or_sb == 'Surface Brightness'): - print(f'translating flux to sb. spec_units = {spec_units}, angle={selected_display_solid_angle_unit}') spec_units /= selected_display_solid_angle_unit print('new spec_units = ', spec_units) # update display units