Skip to content

Commit

Permalink
_like to avoid quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed May 22, 2024
1 parent 799b771 commit 9231d1d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def aperture_weight_mask(self):
# wavelength, on the range [0, 1].
if self.aperture.selected == self.aperture.default_text:
# Entire Cube
return np.ones_like(self.dataset.selected_obj.flux)
return np.ones_like(self.dataset.selected_obj.flux.value)
return self.aperture.get_mask(self.dataset.selected_obj,
self.aperture_method_selected,
self.spectral_display_unit,
Expand All @@ -325,7 +325,7 @@ def aperture_weight_mask(self):
def bg_weight_mask(self):
if self.background.selected == self.background.default_text:
# NO background
return np.zeros_like(self.dataset.selected_obj.flux)
return np.zeros_like(self.dataset.selected_obj.flux.value)

Check warning on line 328 in jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py#L328

Added line #L328 was not covered by tests
return self.background.get_mask(self.dataset.selected_obj,
self.aperture_method_selected,
self.spectral_display_unit,
Expand Down

0 comments on commit 9231d1d

Please sign in to comment.