Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Sep 13, 2024
1 parent 2ad22ff commit 7f6eb00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jdaviz/core/marks.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ def set_y_unit(self, unit=None):
if self.viewer.default_class is Spectrum1D:
spec = self.viewer.state.reference_data.get_object(cls=Spectrum1D)
eqv = u.spectral_density(spec.spectral_axis)

if ('_pixel_scale_factor' in spec.meta):
eqv += _eqv_pixar_sr(spec.meta['_pixel_scale_factor'])
y = (self.y * self.yunit).to_value(unit, equivalencies=eqv)

# for flux <> flux/pix2

# add equiv for flux <> flux/pix2
eqv += _eqv_flux_to_sb_pixel()

y = (self.y * self.yunit).to_value(unit, equivalencies=eqv)
else:
y = (self.y * self.yunit).to_value(unit)
self.yunit = unit
Expand Down

0 comments on commit 7f6eb00

Please sign in to comment.