Skip to content

Commit

Permalink
ensure info.meta is populated
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Dec 10, 2024
1 parent 3e99e42 commit 031ce2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jdaviz/core/freezable_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ def _convert_units_y_limits(self, old_unit, new_unit):
spectral_axis = x_corners * u.Unit(self.x_display_unit)

for layer in self.layers:
if layer.layer.meta.get('_pixel_scale_factor'):
if psc := layer.layer.meta.get('_pixel_scale_factor', None) is not None:
spectral_axis.info.meta = {'_pixel_scale_factor',
layer.layer.meta.get('_pixel_scale_factor')}
psc}
break
else:
spectral_axis.info.meta = {}

y_corners_new = flux_conversion(y_corners, old_unit, new_unit, spectral_axis=spectral_axis) # noqa

Expand Down

0 comments on commit 031ce2c

Please sign in to comment.