moved calc_apply_threshold out of calc_data, removed special case check
This commit is contained in:
@ -5,6 +5,7 @@ from .thresh import threshold
|
||||
|
||||
|
||||
def calc_apply_aggregation(results, data, pixel_mask_pf, aggregator):
|
||||
calc_apply_threshold(results, data) # changes data in place
|
||||
data = calc_data(results, data, aggregator)
|
||||
calc_mask_pixels(data, pixel_mask_pf) # changes data in place
|
||||
aggregation_ready = calc_aggregation_ready(results, data, aggregator)
|
||||
@ -17,16 +18,10 @@ def calc_data(results, data, aggregator):
|
||||
return data
|
||||
|
||||
apply_aggregation = results.get("apply_aggregation", False)
|
||||
apply_threshold = results.get("apply_threshold", False)
|
||||
|
||||
if not apply_aggregation:
|
||||
aggregator.reset()
|
||||
|
||||
if not apply_aggregation and not apply_threshold:
|
||||
return data
|
||||
|
||||
calc_apply_threshold(results, data) # changes data in place
|
||||
|
||||
return calc_aggregate(results, data, aggregator)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user