Skip to content

Commit

Permalink
make updates after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jul 30, 2024
1 parent 499f935 commit 50ffe79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, *args, **kwargs):
dataset='dataset',
multiselect=None,
default_text='None',
subset_selected_changed_callback=self._update_extract)
subset_selected_changed_callback=self._update_extract) # noqa

self.bg_spec_add_results = AddResults(self, 'bg_spec_results_label',
'bg_spec_results_label_default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ def test_background_subtraction(cubeviz_helper, spectrum1d_cube_largest):
# the background subtracted from each slice in wavelength from the aperture should be equal
# to the background -- which is the minimum per spectral slice in this example cube -- divided
# by the number of pixels in the aperture:
cube_min_per_slice = extract_plg._obj.spectral_cube['flux'].min(axis=(0, 1))
cube_min_per_slice = extract_plg._obj.cube['flux'].min(axis=(0, 1))
np.testing.assert_allclose(
bg_spec.flux.value / n_aperture_pixels,
cube_min_per_slice
)

# background normalized per spaxel should be equal to the minimum per spectral slice:
cube_min_per_slice = extract_plg._obj.spectral_cube['flux'].min(axis=(0, 1))
cube_min_per_slice = extract_plg._obj.cube['flux'].min(axis=(0, 1))
np.testing.assert_allclose(
bg_spec_normed.flux.value / n_bg_pixels,
cube_min_per_slice
Expand Down

0 comments on commit 50ffe79

Please sign in to comment.