consistency: removed special case that sends the raw data image
instead of the processed image data
[special case triggered if apply_aggregation and apply_threshold are off, but both can still be not applied if the respective parameters (aggregation_max, threshold_min, threshold_max) are not given, which would send data
]
This commit is contained in:
@ -4,15 +4,15 @@ from .mask import calc_mask_pixels
|
|||||||
from .thresh import threshold
|
from .thresh import threshold
|
||||||
|
|
||||||
|
|
||||||
def calc_apply_aggregation(results, data, pixel_mask_pf, image, aggregator):
|
def calc_apply_aggregation(results, data, pixel_mask_pf, aggregator):
|
||||||
data = calc_data(results, data, image, aggregator)
|
data = calc_data(results, data, aggregator)
|
||||||
calc_mask_pixels(data, pixel_mask_pf) # changes data in place
|
calc_mask_pixels(data, pixel_mask_pf) # changes data in place
|
||||||
aggregation_ready = calc_aggregation_ready(results, data, aggregator)
|
aggregation_ready = calc_aggregation_ready(results, data, aggregator)
|
||||||
return data, aggregation_ready
|
return data, aggregation_ready
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def calc_data(results, data, image, aggregator):
|
def calc_data(results, data, aggregator):
|
||||||
if data.dtype == np.uint16:
|
if data.dtype == np.uint16:
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@ -23,7 +23,6 @@ def calc_data(results, data, image, aggregator):
|
|||||||
aggregator.reset()
|
aggregator.reset()
|
||||||
|
|
||||||
if not apply_aggregation and not apply_threshold:
|
if not apply_aggregation and not apply_threshold:
|
||||||
data = image
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
calc_apply_threshold(results, data) # changes data in place
|
calc_apply_threshold(results, data) # changes data in place
|
||||||
|
@ -115,7 +115,7 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
|
|||||||
calc_peakfinder_analysis(results, pfdata, pixel_mask_pf)
|
calc_peakfinder_analysis(results, pfdata, pixel_mask_pf)
|
||||||
|
|
||||||
# ???
|
# ???
|
||||||
data, aggregation_is_ready = calc_apply_aggregation(results, data, pixel_mask_pf, image, aggregator)
|
data, aggregation_is_ready = calc_apply_aggregation(results, data, pixel_mask_pf, aggregator)
|
||||||
|
|
||||||
results["type"] = str(data.dtype)
|
results["type"] = str(data.dtype)
|
||||||
results["shape"] = data.shape
|
results["shape"] = data.shape
|
||||||
|
Reference in New Issue
Block a user