diff --git a/jdaviz/configs/specviz/plugins/unit_conversion/tests/test_unit_conversion.py b/jdaviz/configs/specviz/plugins/unit_conversion/tests/test_unit_conversion.py index 5dd70ad6ff..0ea0d52090 100644 --- a/jdaviz/configs/specviz/plugins/unit_conversion/tests/test_unit_conversion.py +++ b/jdaviz/configs/specviz/plugins/unit_conversion/tests/test_unit_conversion.py @@ -152,6 +152,9 @@ def test_unit_translation(cubeviz_helper): # data collection item units will be used for translations. assert uc_plg._obj.flux_or_sb_selected == 'Flux' + # accessing from get_data(use_display_units=True) should return flux-like units + assert cubeviz_helper.get_data('Spectrum (sum)', use_display_units=True).unit == u.MJy + # to have access to display units viewer_1d = cubeviz_helper.app.get_viewer( cubeviz_helper._default_spectrum_viewer_reference_name) @@ -165,6 +168,10 @@ def test_unit_translation(cubeviz_helper): # check if units translated assert y_display_unit == u.MJy / u.sr + # get_data(use_display_units=True) should return surface brightness-like units + # NOTE: should be updated to pix**2 + assert cubeviz_helper.get_data('Spectrum (sum)', use_display_units=True).unit == u.MJy / u.pix + def test_sb_unit_conversion(cubeviz_helper): # custom cube to have Surface Brightness units