From 14c643499529cf8ddf64d313f18ce995b2efc8fc Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Fri, 6 Sep 2024 14:30:56 -0400 Subject: [PATCH] Don't set this if unit conversion doesn't exist --- jdaviz/configs/specviz/plugins/parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/configs/specviz/plugins/parsers.py b/jdaviz/configs/specviz/plugins/parsers.py index e77e8b2fa6..0ae7546d95 100644 --- a/jdaviz/configs/specviz/plugins/parsers.py +++ b/jdaviz/configs/specviz/plugins/parsers.py @@ -162,7 +162,7 @@ def specviz_spectrum1d_parser(app, data, data_label=None, format=None, show_in_v # If this is the first loaded data, we want to set spectral y unit type to Flux or # Surface Brightness as appropriate - if len(app.data_collection) == 0: + if len(app.data_collection) == 0 and "Unit Conversion" in app._jdaviz_helper.plugins: uc = app._jdaviz_helper.plugins["Unit Conversion"] if check_if_unit_is_per_solid_angle(flux_units): uc._obj.spectral_y_type = "Surface Brightness"