Skip to content

Commit

Permalink
Don't set this if unit conversion doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Sep 6, 2024
1 parent f839cc6 commit 14c6434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/configs/specviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 14c6434

Please sign in to comment.