From 0b4a770634e8777d914e741c34244631adfe9707 Mon Sep 17 00:00:00 2001 From: "Pey Lian Lim (Github)" <2090236+pllim@users.noreply.github.com> Date: Tue, 28 Jun 2022 18:28:35 -0400 Subject: [PATCH] Sort data for proper raw fit plot --- .../imviz/plugins/aper_phot_simple/aper_phot_simple.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py b/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py index 37e6d4a067..2879f8d315 100644 --- a/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py +++ b/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py @@ -446,8 +446,9 @@ def _radial_profile(radial_cutout, reg_bb, aperture, raw=False): radial_img = radial_cutout.compressed() # data unit if raw: - x_arr = radial_r - y_arr = radial_img + i_arr = np.argsort(radial_r) + x_arr = radial_r[i_arr] + y_arr = radial_img[i_arr] else: # This algorithm is from the imexam package, # see licenses/IMEXAM_LICENSE.txt for more details