diff --git a/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py b/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py index 9da47effac..b1e946cb79 100644 --- a/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py +++ b/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py @@ -121,7 +121,7 @@ def test_cubeviz_aperphot_generated_3d_gaussian_smooth(cubeviz_helper, image_cub plg.dataset_selected = "test[FLUX] spatial-smooth stddev-1.0" plg.aperture_selected = "Subset 1" plg.vue_do_aper_phot() - row = cubeviz_helper.get_aperture_photometry_results()[0] + row = cubeviz_helper.plugins['Aperture Photometry'].export_table()[0] # Basically, we should recover the input rectangle here. assert_allclose(row["xcenter"], 1 * u.pix) @@ -182,7 +182,7 @@ def test_cubeviz_aperphot_cube_sr_and_pix2(cubeviz_helper, cube_unit = u.MJy / solid_angle_unit # cube unit in app is now per pix2 plg.vue_do_aper_phot() - row = cubeviz_helper.get_aperture_photometry_results()[0] + row = cubeviz_helper.plugins['Aperture Photometry'].export_table()[0] # Basically, we should recover the input rectangle here, minus background. assert_allclose(row["xcenter"], 3 * u.pix) @@ -227,7 +227,7 @@ def test_cubeviz_aperphot_cube_orig_flux_mjysr(cubeviz_helper, assert_allclose(plg.flux_scaling, 0.003631) plg.vue_do_aper_phot() - row = cubeviz_helper.get_aperture_photometry_results()[0] + row = cubeviz_helper.plugins['Aperture Photometry'].export_table()[0] # Basically, we should recover the input rectangle here, minus background. assert_allclose(row["xcenter"], 3 * u.pix) diff --git a/jdaviz/configs/imviz/tests/test_parser.py b/jdaviz/configs/imviz/tests/test_parser.py index ef4f1817a6..9e4be2b019 100644 --- a/jdaviz/configs/imviz/tests/test_parser.py +++ b/jdaviz/configs/imviz/tests/test_parser.py @@ -286,7 +286,7 @@ def test_parse_jwst_nircam_level2(self, imviz_helper): assert_allclose(phot_plugin.counts_factor, 0.0036385915646798953) assert_allclose(phot_plugin.flux_scaling, 0.003631) phot_plugin.vue_do_aper_phot() - tbl = imviz_helper.get_aperture_photometry_results() + tbl = imviz_helper.plugins['Aperture Photometry'].export_table() assert_quantity_allclose(tbl[0]['xcenter'], 970.95 * u.pix) assert_quantity_allclose(tbl[0]['ycenter'], 1116.05 * u.pix) sky = tbl[0]['sky_center'] @@ -412,7 +412,7 @@ def test_parse_hst_drz(self, imviz_helper): phot_plugin.background_value = 0.0014 # Manual entry: Median on whole array assert_allclose(phot_plugin.pixel_area, 0.0025) # Not used but still auto-populated phot_plugin.vue_do_aper_phot() - tbl = imviz_helper.get_aperture_photometry_results() + tbl = imviz_helper.plugins['Aperture Photometry'].export_table() assert_quantity_allclose(tbl[0]['xcenter'], 1488.5 * u.pix, atol=2 * u.pix) assert_quantity_allclose(tbl[0]['ycenter'], 2576 * u.pix, atol=2 * u.pix) sky = tbl[0]['sky_center'] diff --git a/jdaviz/configs/imviz/tests/test_simple_aper_phot.py b/jdaviz/configs/imviz/tests/test_simple_aper_phot.py index cd9d689477..f9b7f65882 100644 --- a/jdaviz/configs/imviz/tests/test_simple_aper_phot.py +++ b/jdaviz/configs/imviz/tests/test_simple_aper_phot.py @@ -442,7 +442,7 @@ def test_fit_radial_profile_with_nan(imviz_helper): with warnings.catch_warnings(): warnings.simplefilter("ignore") # Fitter warnings do not matter, only want error. phot_plugin.vue_do_aper_phot() - tbl = imviz_helper.get_aperture_photometry_results() + tbl = imviz_helper.plugins['Aperture Photometry'].export_table() assert phot_plugin.result_failed_msg == '' assert_allclose(tbl['sum'][0], 8590.419296) @@ -541,7 +541,7 @@ def test_cubeviz_batch(cubeviz_helper, spectrum1d_cube_fluxunit_jy_per_steradian phot_plugin.calculate_batch_photometry(full_exceptions=True) assert len(phot_plugin.table) == 2 - tbl = cubeviz_helper.get_aperture_photometry_results() + tbl = cubeviz_helper.plugins['Aperture Photometry'].export_table() assert_quantity_allclose(tbl['sum'], [5.980836e-12, 2.037396e-10] * u.Jy, rtol=1e-4) # Test that it still works after unit conversion @@ -550,7 +550,7 @@ def test_cubeviz_batch(cubeviz_helper, spectrum1d_cube_fluxunit_jy_per_steradian phot_plugin.calculate_batch_photometry(full_exceptions=True) assert len(phot_plugin.table) == 4 - tbl = cubeviz_helper.get_aperture_photometry_results() + tbl = cubeviz_helper.plugins['Aperture Photometry'].export_table() # get_aperture_photometry_results converts all to the same units assert_quantity_allclose(tbl['sum'], [5.980836e-12, 2.037396e-10, 5.980836e-12, 2.037396e-10] * u.Jy,