diff --git a/configuration/pipeline_config/bs_cam_test.json b/configuration/pipeline_config/bs_cam_test.json new file mode 100644 index 0000000..8bbf04e --- /dev/null +++ b/configuration/pipeline_config/bs_cam_test.json @@ -0,0 +1,20 @@ +{ + "pipeline_type": "processing", + "camera_name": "SARES20-CAMS142-M5", + "name": "bs_cam_test.py", + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "bsread_address": "", + "bsread_channels": [ + "SARES20-CAMS142-M5.roi_signal_x_profile", + "SAR-CVME-TIFALL5:EvtSet", + "SIN-CVME-TIFGUN-EVR0:BUNCH-1-OK" + ], + "bsread_image_buf": 1000, + "bsread_data_buf": 1000, + "function": "bs_cam_test" +} diff --git a/configuration/user_scripts/bs_cam_test.py b/configuration/user_scripts/bs_cam_test.py new file mode 100644 index 0000000..ef6d59f --- /dev/null +++ b/configuration/user_scripts/bs_cam_test.py @@ -0,0 +1,10 @@ + +from cam_server.pipeline.data_processing import functions, processor + + +def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata): + ret = processor.process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata) + if bsdata is not None: + ret.update(bsdata) + ret["State"] = "OK" if bsdata is not None else "ERROR" + return ret