21 lines
942 B
Python
21 lines
942 B
Python
from collections import OrderedDict
|
|
from cam_server.pipeline.data_processing import functions
|
|
from logging import getLogger
|
|
|
|
_logger = getLogger(__name__)
|
|
|
|
def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata):
|
|
ret = OrderedDict()
|
|
prefix = parameters["camera_name"]
|
|
(x_profile, y_profile) = functions.get_x_y_profile(image)
|
|
#_, _, _, x_fit_mean, x_fit_standard_deviation, _, _ = functions.gauss_fit(x_profile, x_axis)
|
|
#_, _, _, y_fit_mean, y_fit_standard_deviation, _, _ = functions.gauss_fit(y_profile, y_axis)
|
|
x_fwhm = functions.get_fw(x_axis,x_profile)
|
|
#y_fwhm = functions.get_fw(y_axis,y_profile)
|
|
intensity = x_profile.sum()
|
|
#ret[prefix+":intensity"] = intensity
|
|
ret[prefix+":test_int"] = int(intensity)
|
|
#ret[prefix+":x_fit_mean"] = x_fit_mean
|
|
#ret[prefix+":x_fwhm"] = x_fwhm
|
|
#ret[prefix+":x_fit_standard_deviation"] = x_fit_standard_deviation
|
|
return ret |