Skip to content

Commit

Permalink
broadcast sb change for mouseover
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Aug 9, 2024
1 parent f5c93ab commit 39f11de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/configs/imviz/plugins/coords_info/coords_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _on_viewer_added(self, msg):

def _on_global_display_unit_changed(self, msg):
# eventually should observe change in flux OR angle
if msg.axis == "flux":
if msg.axis == "sb":
self.image_unit = u.Unit(msg.unit)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def _on_glue_y_display_unit_changed(self, y_unit_str):
self.flux_unit.selected,
self.angle_unit.selected
)
self.hub.broadcast(GlobalDisplayUnitChanged("sb", self.sb_unit_selected, sender=self))

if not self.flux_unit.selected:
y_display_unit = self.spectrum_viewer.state.y_display_unit
Expand Down Expand Up @@ -261,6 +262,7 @@ def _on_flux_unit_changed(self, msg):
# and broacast that there has been a change in flux
self.hub.broadcast(GlobalDisplayUnitChanged("flux", flux_or_sb, sender=self))


if not check_if_unit_is_per_solid_angle(self.spectrum_viewer.state.y_display_unit):
self.flux_or_sb_selected = 'Flux'
else:
Expand Down

0 comments on commit 39f11de

Please sign in to comment.