use ndarray.copy consistently

This commit is contained in:
2024-08-02 18:50:52 +02:00
parent 68619f1181
commit 88c81a905b

View File

@ -21,7 +21,7 @@ def calc_radial_integration(results, data, pixel_mask_pf, center, rad, norm):
if apply_threshold and all(k in results for k in ("threshold_min", "threshold_max")):
threshold_min = float(results["threshold_min"])
threshold_max = float(results["threshold_max"])
data = np.copy(data) # do the following in-place changes on a copy
data = data.copy() # do the following in-place changes on a copy
data[data < threshold_min] = np.nan
#TODO: skipping max is a guess, but not obvious/symmetric -- better to ensure the order min < max by switching them if needed
if threshold_max > threshold_min: