Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Aug 14, 2024
1 parent 63f895d commit a34fa0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jdaviz/configs/imviz/plugins/coords_info/coords_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from jdaviz.core.registries import tool_registry
from jdaviz.core.template_mixin import TemplateMixin, DatasetSelectMixin
from jdaviz.utils import _eqv_pixar_sr, _convert_surface_brightness_units
from jdaviz.core.validunits import check_if_unit_is_per_solid_angle

__all__ = ['CoordsInfo']

Expand Down Expand Up @@ -126,11 +127,16 @@ def _on_global_display_unit_changed(self, msg):
# viewer (flux or sb). e.g if data loaded is in MJy / sr, and the spectrum
# viewer is toggled to 'flux', mouseover should show data in MJy.

self.hub.broadcast(SnackbarMessage(f"In _on_global_display_unit_changed, msg = {msg.axis} unit = {msg.unit}", color='error', sender=self))

if msg.axis == "spectral_y":
self.image_unit = u.Unit(msg.unit)

# if the data unit is a surface brightness, but the spectral y
# axis is a 'flux' with no solid angle, we must convert the display
# unit to a SB. this will be changed when angle selection to generalize
# to non-steradian units is implemented.
if not check_if_unit_is_per_solid_angle(self.image_unit):


@property
def marks(self):
"""
Expand Down

0 comments on commit a34fa0b

Please sign in to comment.