From 46308b16a946f6d4df246993875c3cb38d7a6929 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 2 Aug 2024 16:52:34 +0200 Subject: [PATCH] function order --- dap/algos/radprof.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dap/algos/radprof.py b/dap/algos/radprof.py index 4b42e6e..c54bc02 100644 --- a/dap/algos/radprof.py +++ b/dap/algos/radprof.py @@ -50,15 +50,6 @@ def calc_radial_integration(results, data, pixel_mask_pf, center, rad): return center, rad - -def radial_profile(data, rad, norm, keep_pixels=None): - if keep_pixels is not None: - data = data[keep_pixels] - data = data.ravel() - tbin = np.bincount(rad, data) - rp = tbin / norm - return rp - def prepare_radial_profile(data, center, keep_pixels=None): y, x = np.indices(data.shape) x0, y0 = center @@ -70,4 +61,13 @@ def prepare_radial_profile(data, center, keep_pixels=None): return rad, norm +def radial_profile(data, rad, norm, keep_pixels=None): + if keep_pixels is not None: + data = data[keep_pixels] + data = data.ravel() + tbin = np.bincount(rad, data) + rp = tbin / norm + return rp + +