early exit 2
This commit is contained in:
@ -14,7 +14,10 @@ def calc_force_send(results, data, pixel_mask_pf, image, n_aggregated_images, da
|
||||
data_summed = None
|
||||
n_aggregated_images = 1
|
||||
|
||||
if apply_threshold or apply_aggregation:
|
||||
if not apply_threshold and not apply_aggregation:
|
||||
data = image
|
||||
return data, force_send_visualisation, n_aggregated_images, data_summed
|
||||
|
||||
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"])
|
||||
@ -39,9 +42,6 @@ def calc_force_send(results, data, pixel_mask_pf, image, n_aggregated_images, da
|
||||
if pixel_mask_pf is not None:
|
||||
data[~pixel_mask_pf] = np.nan
|
||||
|
||||
else:
|
||||
data = image
|
||||
|
||||
return data, force_send_visualisation, n_aggregated_images, data_summed
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user