From 7dbbfd6676f7d401f4bbb7cb95ff769e963d8afc Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 May 2025 10:17:58 +0200 Subject: [PATCH] 05.2025 --- .../camera_config/ABRTL-DSCR-0440.json | 8 ++-- .../camera_config/ABRTL-DSCR-0680.json | 13 +++++- .../camera_config/ABRTL-DSCR-0870.json | 13 +++++- .../camera_config/ARS01-DSCR-0750.json | 8 ++-- .../camera_config/X01DD-ES-CAM1.json | 32 +++++++++++++++ .../camera_config/X01DD-FE-CAM1.json | 14 +++---- .../camera_config/X01DD-SC-CAM1.json | 26 ++++++++++++ .../camera_config/X08DB-FE-CAM1.json | 18 ++++++++- .../camera_config/X08DB-FE-CAM2.json | 3 ++ .../pipeline_config/ALBDI-SM-2_emittance.json | 3 +- .../pipeline_config/ALBDI-SM-2_sp.json | 40 ++++++++++++++++--- .../pipeline_config/ALBDI-SM-2_sp_proc.json | 3 +- .../X01DD-ES-CAM1_emittance.json | 13 ++++++ .../pipeline_config/X01DD-ES-CAM1_sp.json | 33 +++++++++++++++ .../X01DD-ES-CAM1_sp_proc.json | 12 ++++++ .../pipeline_config/X01DD-FE-CAM1_proc.json | 7 +++- .../pipeline_config/X01DD-FE-CAM1_sp.json | 7 +++- .../pipeline_config/X01DD-SC-CAM1_sp.json | 11 +++++ .../pipeline_config/permanent_instances.json | 4 +- configuration/pipeline_config/servers.json | 8 +++- .../sls-daqsync-22.psi.ch:11135_sp.json | 11 +++++ configuration/user_scripts/pipolar.py | 10 ++--- 22 files changed, 262 insertions(+), 35 deletions(-) create mode 100644 configuration/camera_config/X01DD-ES-CAM1.json create mode 100644 configuration/camera_config/X01DD-SC-CAM1.json create mode 100644 configuration/pipeline_config/X01DD-ES-CAM1_emittance.json create mode 100644 configuration/pipeline_config/X01DD-ES-CAM1_sp.json create mode 100644 configuration/pipeline_config/X01DD-ES-CAM1_sp_proc.json create mode 100644 configuration/pipeline_config/X01DD-SC-CAM1_sp.json create mode 100644 configuration/pipeline_config/sls-daqsync-22.psi.ch:11135_sp.json diff --git a/configuration/camera_config/ABRTL-DSCR-0440.json b/configuration/camera_config/ABRTL-DSCR-0440.json index 9744e2c..eed51fb 100644 --- a/configuration/camera_config/ABRTL-DSCR-0440.json +++ b/configuration/camera_config/ABRTL-DSCR-0440.json @@ -1,10 +1,10 @@ { "camera_calibration": { "reference_marker": [ - 512, - 140, - 4223, - 3875 + 459, + 111, + 4176, + 3834 ], "reference_marker_width": 20000.0, "reference_marker_height": 20000.0, diff --git a/configuration/camera_config/ABRTL-DSCR-0680.json b/configuration/camera_config/ABRTL-DSCR-0680.json index 177e82a..b3b3ec6 100644 --- a/configuration/camera_config/ABRTL-DSCR-0680.json +++ b/configuration/camera_config/ABRTL-DSCR-0680.json @@ -1,5 +1,16 @@ { - "camera_calibration": null, + "camera_calibration": { + "reference_marker": [ + 930, + 253, + 3429, + 2751 + ], + "reference_marker_width": 30000.0, + "reference_marker_height": 30000.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, "mirror_x": false, "mirror_y": false, "rotate": 0, diff --git a/configuration/camera_config/ABRTL-DSCR-0870.json b/configuration/camera_config/ABRTL-DSCR-0870.json index 4e3396a..c6b905d 100644 --- a/configuration/camera_config/ABRTL-DSCR-0870.json +++ b/configuration/camera_config/ABRTL-DSCR-0870.json @@ -1,5 +1,16 @@ { - "camera_calibration": null, + "camera_calibration": { + "reference_marker": [ + 441, + 145, + 1400, + 1101 + ], + "reference_marker_width": 30000.0, + "reference_marker_height": 30000.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, "mirror_x": false, "mirror_y": false, "rotate": 0, diff --git a/configuration/camera_config/ARS01-DSCR-0750.json b/configuration/camera_config/ARS01-DSCR-0750.json index c11c768..e3bd0a1 100644 --- a/configuration/camera_config/ARS01-DSCR-0750.json +++ b/configuration/camera_config/ARS01-DSCR-0750.json @@ -1,10 +1,10 @@ { "camera_calibration": { "reference_marker": [ - 230, - 195, - 1405, - 1025 + 316, + 163, + 1482, + 988 ], "reference_marker_width": 20000.0, "reference_marker_height": 20000.0, diff --git a/configuration/camera_config/X01DD-ES-CAM1.json b/configuration/camera_config/X01DD-ES-CAM1.json new file mode 100644 index 0000000..c86dff5 --- /dev/null +++ b/configuration/camera_config/X01DD-ES-CAM1.json @@ -0,0 +1,32 @@ +{ + "camera_calibration": { + "reference_marker": [ + 10, + 10, + 72, + 72 + ], + "reference_marker_width": 500.0, + "reference_marker_height": 500.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, + "mirror_x": false, + "mirror_y": false, + "rotate": 0, + "roi": null, + "image_background": null, + "source_type": "bsread", + "prefix": "X01DD-ES-CAM1", + "name": "X01DD-ES-CAM1", + "source": "X01DD-ES-CAM1", + "connections": 1, + "buffer_size": 0, + "debug": false, + "check_timestamp": false, + "enforce_pid": false, + "enforce_timestamp": false, + "group": [ + "Frontend" + ] +} \ No newline at end of file diff --git a/configuration/camera_config/X01DD-FE-CAM1.json b/configuration/camera_config/X01DD-FE-CAM1.json index 04ef397..3ed2fc6 100644 --- a/configuration/camera_config/X01DD-FE-CAM1.json +++ b/configuration/camera_config/X01DD-FE-CAM1.json @@ -1,17 +1,17 @@ { "camera_calibration": { "reference_marker": [ - 100, - 100, - 219, - 219 + 339, + 339, + 2077, + 2077 ], - "reference_marker_width": 500.0, - "reference_marker_height": 500.0, + "reference_marker_width": 4280.0, + "reference_marker_height": 4280.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, - "mirror_x": false, + "mirror_x": true, "mirror_y": false, "rotate": 0, "roi": null, diff --git a/configuration/camera_config/X01DD-SC-CAM1.json b/configuration/camera_config/X01DD-SC-CAM1.json new file mode 100644 index 0000000..82b0bdd --- /dev/null +++ b/configuration/camera_config/X01DD-SC-CAM1.json @@ -0,0 +1,26 @@ +{ + "camera_calibration": { + "reference_marker": [ + 10, + 102, + 2800, + 210 + ], + "reference_marker_width": 1980.0, + "reference_marker_height": 1000.0, + "angle_horizontal": 1.0, + "angle_vertical": 100.0 + }, + "mirror_x": false, + "mirror_y": false, + "rotate": 0, + "roi": null, + "image_background": null, + "source_type": "epics", + "prefix": "X01DD-SC-CAM1", + "name": "X01DD-SC-CAM1", + "source": "X01DD-SC-CAM1", + "group": [ + "Frontend" + ] +} \ No newline at end of file diff --git a/configuration/camera_config/X08DB-FE-CAM1.json b/configuration/camera_config/X08DB-FE-CAM1.json index ccb129c..18fd95c 100644 --- a/configuration/camera_config/X08DB-FE-CAM1.json +++ b/configuration/camera_config/X08DB-FE-CAM1.json @@ -1,10 +1,26 @@ { - "mirror_x": false, + "camera_calibration": { + "reference_marker": [ + 348, + 348, + 1200, + 1200 + ], + "reference_marker_width": 2080.0, + "reference_marker_height": 2080.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, + "mirror_x": true, "mirror_y": false, "rotate": 0, "roi": null, "image_background": null, "source_type": "bsread", + "debug": true, + "check_timestamp": false, + "enforce_pid": false, + "enforce_timestamp": false, "prefix": "X08DB-FE-CAM1", "name": "X08DB-FE-CAM1", "source": "X08DB-FE-CAM1", diff --git a/configuration/camera_config/X08DB-FE-CAM2.json b/configuration/camera_config/X08DB-FE-CAM2.json index d833f65..e671197 100644 --- a/configuration/camera_config/X08DB-FE-CAM2.json +++ b/configuration/camera_config/X08DB-FE-CAM2.json @@ -8,6 +8,9 @@ "prefix": "X08DB-FE-CAM2", "name": "X08DB-FE-CAM2", "source": "X08DB-FE-CAM2", + "check_timestamp": false, + "enforce_pid": false, + "enforce_timestamp": false, "group": [ "Frontend" ] diff --git a/configuration/pipeline_config/ALBDI-SM-2_emittance.json b/configuration/pipeline_config/ALBDI-SM-2_emittance.json index b1c003e..ab45932 100644 --- a/configuration/pipeline_config/ALBDI-SM-2_emittance.json +++ b/configuration/pipeline_config/ALBDI-SM-2_emittance.json @@ -1,7 +1,8 @@ { "name": "ALBDI-SM-2_emittance", "pipeline_type": "stream", - "input_pipeline": "ALBDI-SM-2_sp_emit", + "_input_pipeline": "ALBDI-SM-2_sp_emit", + "input_pipeline": "ALBDI-SM-2_sp", "mode": "PUB", "function": "propagate_stream", "include": [ diff --git a/configuration/pipeline_config/ALBDI-SM-2_sp.json b/configuration/pipeline_config/ALBDI-SM-2_sp.json index 43c07e3..ae3e554 100644 --- a/configuration/pipeline_config/ALBDI-SM-2_sp.json +++ b/configuration/pipeline_config/ALBDI-SM-2_sp.json @@ -1,8 +1,38 @@ { + "_name": "ALBDI-SM-2_sp", + "_pipeline_type": "stream", + "_input_pipeline": "ALBDI-SM-2_sp_emit", + "_mode": "PUB", + "_function": "propagate_stream", + "max_frame_rate": 10.1, + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "camera_name": "ALBDI-SM-2", "name": "ALBDI-SM-2_sp", - "pipeline_type": "stream", - "input_pipeline": "ALBDI-SM-2_sp_emit", - "mode": "PUB", - "function": "propagate_stream", - "max_frame_rate": 10.1 + "function": "sp_pipolar", + "fit": { + "delta_height": 50, + "bg_range_low": [ + 0, + 200 + ], + "bg_range_high": [ + 840, + 1040 + ], + "peak_search_rel_range": [ + -1, + 2 + ], + "valley_search_rel_range": [ + -1, + 2 + ] + }, + "copy": true } \ No newline at end of file diff --git a/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json b/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json index cd2f571..2f41c7a 100644 --- a/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json +++ b/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json @@ -1,7 +1,8 @@ { "name": "ALBDI-SM-2_sp_proc", "pipeline_type": "stream", - "input_pipeline": "ALBDI-SM-2_sp_emit", + "_input_pipeline": "ALBDI-SM-2_sp_emit", + "input_pipeline": "ALBDI-SM-2_sp", "mode": "PUB", "block": false, "function": "epics_forwarder_sp.py", diff --git a/configuration/pipeline_config/X01DD-ES-CAM1_emittance.json b/configuration/pipeline_config/X01DD-ES-CAM1_emittance.json new file mode 100644 index 0000000..f0449a4 --- /dev/null +++ b/configuration/pipeline_config/X01DD-ES-CAM1_emittance.json @@ -0,0 +1,13 @@ +{ + "name": "X01DD-ES-CAM1_emittance", + "pipeline_type": "stream", + "input_pipeline": "X01DD-ES-CAM1_sp", + "mode": "PUB", + "function": "pipolar.py", + "include": [ + "emittance", + "emittance2", + "emittance_status" + ], + "reload": true +} \ No newline at end of file diff --git a/configuration/pipeline_config/X01DD-ES-CAM1_sp.json b/configuration/pipeline_config/X01DD-ES-CAM1_sp.json new file mode 100644 index 0000000..78f9cf1 --- /dev/null +++ b/configuration/pipeline_config/X01DD-ES-CAM1_sp.json @@ -0,0 +1,33 @@ +{ + "max_frame_rate": 10.1, + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "name": "X01DD-ES-CAM1_sp", + "camera_name": "X01DD-ES-CAM1", + "function": "sp_pipolar", + "fit": { + "delta_height": 50, + "bg_range_low": [ + 0, + 200 + ], + "bg_range_high": [ + 840, + 1040 + ], + "peak_search_rel_range": [ + -1, + 2 + ], + "valley_search_rel_range": [ + -1, + 2 + ] + }, + "copy": true +} \ No newline at end of file diff --git a/configuration/pipeline_config/X01DD-ES-CAM1_sp_proc.json b/configuration/pipeline_config/X01DD-ES-CAM1_sp_proc.json new file mode 100644 index 0000000..f444abd --- /dev/null +++ b/configuration/pipeline_config/X01DD-ES-CAM1_sp_proc.json @@ -0,0 +1,12 @@ +{ + "name": "X01DD-ES-CAM1_sp_proc", + "pipeline_type": "stream", + "input_pipeline": "X01DD-ES-CAM1_sp", + "mode": "PUB", + "block": false, + "function": "epics_forwarder_sp.py", + "_max_frame_rate": 10.1, + "throw_epics_errors": true, + "abort_on_timeout": true, + "stream_timeout": 60 +} \ No newline at end of file diff --git a/configuration/pipeline_config/X01DD-FE-CAM1_proc.json b/configuration/pipeline_config/X01DD-FE-CAM1_proc.json index 1e71097..2d3376a 100644 --- a/configuration/pipeline_config/X01DD-FE-CAM1_proc.json +++ b/configuration/pipeline_config/X01DD-FE-CAM1_proc.json @@ -2,7 +2,12 @@ "image_background_enable": false, "image_background": null, "image_threshold": null, - "image_region_of_interest": null, + "image_region_of_interest": [ + 941, + 633, + 945, + 572 + ], "image_good_region": null, "image_slices": null, "pipeline_type": "processing", diff --git a/configuration/pipeline_config/X01DD-FE-CAM1_sp.json b/configuration/pipeline_config/X01DD-FE-CAM1_sp.json index 97a90d3..171f5a1 100644 --- a/configuration/pipeline_config/X01DD-FE-CAM1_sp.json +++ b/configuration/pipeline_config/X01DD-FE-CAM1_sp.json @@ -2,7 +2,12 @@ "image_background_enable": false, "image_background": null, "image_threshold": null, - "image_region_of_interest": null, + "image_region_of_interest": [ + 941, + 633, + 945, + 572 + ], "image_good_region": null, "image_slices": null, "pipeline_type": "processing", diff --git a/configuration/pipeline_config/X01DD-SC-CAM1_sp.json b/configuration/pipeline_config/X01DD-SC-CAM1_sp.json new file mode 100644 index 0000000..224e0d5 --- /dev/null +++ b/configuration/pipeline_config/X01DD-SC-CAM1_sp.json @@ -0,0 +1,11 @@ +{ + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "camera_name": "X01DD-SC-CAM1", + "name": "X01DD-SC-CAM1_sp" +} \ No newline at end of file diff --git a/configuration/pipeline_config/permanent_instances.json b/configuration/pipeline_config/permanent_instances.json index 1cdbef0..e81de33 100644 --- a/configuration/pipeline_config/permanent_instances.json +++ b/configuration/pipeline_config/permanent_instances.json @@ -1,4 +1,5 @@ { + "#ALBDI-SM-2_emittance": "ALBDI-SM-2_emittance", "#ALIDI-SM-5_proc": "ALIDI-SM-5_proc", "#simulation_proc_sp": "simulation_proc_sp", "#simulation_sp1": "simulation_sp", @@ -7,7 +8,6 @@ "ABRTL-DSCR-0440_proc": "ABRTL-DSCR-0440_proc", "ABRTL-DSCR-0680_proc": "ABRTL-DSCR-0680_proc", "ABRTL-DSCR-0870_proc": "ABRTL-DSCR-0870_proc", - "ALBDI-SM-2_emittance": "ALBDI-SM-2_emittance", "ALBDI-SM-2_sp_proc": "ALBDI-SM-2_sp_proc", "ALIDI-SM-3_proc": "ALIDI-SM-3_proc", "ALIDI-SM-4_proc": "ALIDI-SM-4_proc", @@ -22,6 +22,8 @@ "ARS05-RCAM-0230_proc2": "ARS05-RCAM-0230_proc2", "ARS05-RCAM-0310_proc": "ARS05-RCAM-0310_proc", "ARS05-RCAM-0310_proc2": "ARS05-RCAM-0310_proc2", + "X01DD-ES-CAM1_emittance": "X01DD-ES-CAM1_emittance", + "X01DD-ES-CAM1_sp_proc": "X01DD-ES-CAM1_sp_proc", "X01DD-FE-CAM1_proc": "X01DD-FE-CAM1_proc", "X08DB-FE-CAM1_proc": "X08DB-FE-CAM1_proc", "emittance_pipolar": "emittance_pipolar" diff --git a/configuration/pipeline_config/servers.json b/configuration/pipeline_config/servers.json index 24b387d..473314d 100644 --- a/configuration/pipeline_config/servers.json +++ b/configuration/pipeline_config/servers.json @@ -29,14 +29,18 @@ "ABRTL-DSCR-0680", "ABRTL-DSCR-0870", "ARS01-DSCR-0750", - "X01DD-FE-CAM1" + "X01DD-FE-CAM1", + "X01DD-ES-CAM1", + "X01DD-SC-CAM1" ], "enabled": true, "expanding": false, "instances": [ "ALIDI-SM-5_sp_proc", "ALBDI-SM-2_sp_proc", - "ALBDI-SM-2_emittance:9001" + "ALBDI-SM-2_emittance:9001", + "X01DD-ES-CAM1_emittance", + "X01DD-ES-CAM1_sp_proc" ] }, "http://sls-daqsync-43.psi.ch:8881": { diff --git a/configuration/pipeline_config/sls-daqsync-22.psi.ch:11135_sp.json b/configuration/pipeline_config/sls-daqsync-22.psi.ch:11135_sp.json new file mode 100644 index 0000000..ce1ce46 --- /dev/null +++ b/configuration/pipeline_config/sls-daqsync-22.psi.ch:11135_sp.json @@ -0,0 +1,11 @@ +{ + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "camera_name": "sls-daqsync-22.psi.ch:11135", + "name": "sls-daqsync-22.psi.ch:11135_sp" +} \ No newline at end of file diff --git a/configuration/user_scripts/pipolar.py b/configuration/user_scripts/pipolar.py index 692d10e..43a6dc2 100644 --- a/configuration/user_scripts/pipolar.py +++ b/configuration/user_scripts/pipolar.py @@ -22,8 +22,8 @@ class PpolPeakValley(): self.x, self.y = self.ppol_interpol() def ppol_interpol(self, plot_flag=False): - ipv = [0.0, 32.976, 20.848, 15.306, 12.121, 10.050, 8.595, 7.518, 6.687, 6.028, 5.491, 5.047, 4.673, 4.353, 4.078, 3.837, 3.439, 3.122, 2.865, 2.652, 2.473, 2.320] - sig = [0.0, 3.659, 5.175, 6.338, 7.318, 8.182, 8.963, 9.681, 10.350, 10.978, 11.572, 12.136, 12.676, 13.194, 13.692, 14.172, 15.087, 15.950, 16.769, 17.549, 18.296, 19.014] + ipv = [32.976,20.848,15.306,12.121,10.0499899,8.595,7.5176,6.6871,6.0276,5.491,5.0471,4.673,4.353,4.0778,3.837,3.439,3.122,2.865,2.652,2.473,2.32] + sig = [3.659, 5.175, 6.338, 7.318, 8.182, 8.963, 9.681, 10.350, 10.978, 11.572, 12.136, 12.676, 13.194, 13.692, 14.172, 15.087, 15.950, 16.769, 17.549, 18.296, 19.014] sig2 = [element * element for element in sig] x = np.linspace(0, 999999, 999999) x = [(1+val)/1000000*max(ipv) for val in x] @@ -46,9 +46,9 @@ class PpolPeakValley(): return self.y[i-1] #For peak search - delta(h) to max peak value -DELTA_HEIGHT = 400 -BG_XRANGE_LOW = [340, 400] #100 160 -BG_XRANGE_HIGH = [460, 520] #840 900 +DELTA_HEIGHT = 400 # 400 +BG_XRANGE_LOW = [340, 400] #100 160 [340, 400] +BG_XRANGE_HIGH = [460, 520] #840 900 [460, 520] PEAK_SEARCH_REL_RANGE = [-1, 2] VALLEY_SEARCH_REL_RANGE = [-2, 3]