zero is zero

This commit is contained in:
2024-08-09 15:04:22 +02:00
parent f12a736355
commit 48c6bbe7c7

View File

@ -40,10 +40,10 @@ def calc_apply_threshold(results, data):
#TODO: this is duplicated in calc_apply_threshold and calc_radial_integration #TODO: this is duplicated in calc_apply_threshold and calc_radial_integration
threshold_min = float(results["threshold_min"]) threshold_min = float(results["threshold_min"])
threshold_max = float(results["threshold_max"]) threshold_max = float(results["threshold_max"])
data[data < threshold_min] = 0.0 data[data < threshold_min] = 0
#TODO: skipping max is a guess, but not obvious/symmetric -- better to ensure the order min < max by switching them if needed #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: if threshold_max > threshold_min:
data[data > threshold_max] = 0.0 data[data > threshold_max] = 0
def calc_apply_aggregation(results, data, data_summed, n_aggregated_images): def calc_apply_aggregation(results, data, data_summed, n_aggregated_images):