diff --git a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py index 8af7fb968d..f7a0c238e1 100644 --- a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py +++ b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py @@ -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', @@ -547,7 +547,7 @@ def extract(self, return_bg=False, add_data=True, **kwargs): spec.meta['_pixel_scale_factor'] = pix_scale_factor # inform the user if scale factor keyword not in metadata - if 'PIXAR_SR' not in self.spectral_cube.meta: + if 'PIXAR_SR' not in self.cube.meta: snackbar_message = SnackbarMessage( ("PIXAR_SR FITS header keyword not found when parsing spectral cube. " "Flux/Surface Brightness will use default PIXAR_SR value of 1 sr/pix^2."), diff --git a/jdaviz/configs/cubeviz/plugins/spectral_extraction/tests/test_spectral_extraction.py b/jdaviz/configs/cubeviz/plugins/spectral_extraction/tests/test_spectral_extraction.py index d0146c01fb..32895927e6 100644 --- a/jdaviz/configs/cubeviz/plugins/spectral_extraction/tests/test_spectral_extraction.py +++ b/jdaviz/configs/cubeviz/plugins/spectral_extraction/tests/test_spectral_extraction.py @@ -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