function order

This commit is contained in:
2024-08-02 16:52:34 +02:00
parent 26e2a3f619
commit 46308b16a9

View File

@ -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