the usual todo note
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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"])
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user