the usual todo note

This commit is contained in:
2024-08-09 12:56:15 +02:00
parent 03b556d61f
commit a7429115d7
3 changed files with 4 additions and 2 deletions

View File

@ -37,9 +37,11 @@ def calc_apply_threshold(results, data):
if k not in results:
return
#TODO: this is duplicated in calc_apply_threshold and calc_radial_integration
threshold_min = float(results["threshold_min"])
threshold_max = float(results["threshold_max"])
data[data < threshold_min] = 0.0
#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:
data[data > threshold_max] = 0.0

View File

@ -18,7 +18,7 @@ def calc_radial_integration(results, data, pixel_mask_pf):
apply_threshold = results.get("apply_threshold", False)
#TODO: this is duplicated in calc_apply_threshold
#TODO: this is duplicated in calc_apply_threshold and calc_force_send
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"])

View File

@ -13,7 +13,7 @@ def calc_apply_threshold(results, data):
threshold_value_choice = results.get("threshold_value", "NaN")
threshold_value = 0 if threshold_value_choice == "0" else np.nan #TODO
#TODO: this is duplicated in calc_radial_integration
#TODO: this is duplicated in calc_radial_integration and calc_force_send
threshold_min = float(results["threshold_min"])
threshold_max = float(results["threshold_max"])
data[data < threshold_min] = threshold_value