diff --git a/configuration/camera_config/ABODI-SM-1S1.json b/configuration/camera_config/ABODI-SM-1S1.json index a86bb9e..9965859 100644 --- a/configuration/camera_config/ABODI-SM-1S1.json +++ b/configuration/camera_config/ABODI-SM-1S1.json @@ -1,13 +1,25 @@ { + "camera_calibration": { + "reference_marker": [ + 1320, + 720, + 1680, + 1080 + ], + "reference_marker_width": 10000.0, + "reference_marker_height": 10000.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": "ABODI-SM-1S1", "name": "ABODI-SM-1S1", "source": "ABODI-SM-1S1", - "source_type": "bsread", "connections": 1, "buffer_size": 0, "debug": false, diff --git a/configuration/camera_config/ALIDI-SM-E.json b/configuration/camera_config/ALIDI-SM-E.json index ca9154b..cc33362 100644 --- a/configuration/camera_config/ALIDI-SM-E.json +++ b/configuration/camera_config/ALIDI-SM-E.json @@ -1,10 +1,10 @@ { "camera_calibration": { "reference_marker": [ - 575, - 360, - 650, - 430 + 531, + 256, + 639, + 364 ], "reference_marker_width": 2000.0, "reference_marker_height": 2000.0, diff --git a/configuration/pipeline_config/ALBDI-SM-2_emittance.json b/configuration/pipeline_config/ALBDI-SM-2_emittance.json new file mode 100644 index 0000000..b1c003e --- /dev/null +++ b/configuration/pipeline_config/ALBDI-SM-2_emittance.json @@ -0,0 +1,12 @@ +{ + "name": "ALBDI-SM-2_emittance", + "pipeline_type": "stream", + "input_pipeline": "ALBDI-SM-2_sp_emit", + "mode": "PUB", + "function": "propagate_stream", + "include": [ + "emittance", + "emittance2", + "emittance_status" + ] +} \ No newline at end of file diff --git a/configuration/pipeline_config/ALBDI-SM-2_sp.json b/configuration/pipeline_config/ALBDI-SM-2_sp.json index b7fdb3b..43c07e3 100644 --- a/configuration/pipeline_config/ALBDI-SM-2_sp.json +++ b/configuration/pipeline_config/ALBDI-SM-2_sp.json @@ -1,33 +1,8 @@ { - "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", - "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 + "pipeline_type": "stream", + "input_pipeline": "ALBDI-SM-2_sp_emit", + "mode": "PUB", + "function": "propagate_stream", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/ALBDI-SM-2_sp_emit.json b/configuration/pipeline_config/ALBDI-SM-2_sp_emit.json new file mode 100644 index 0000000..ee751cf --- /dev/null +++ b/configuration/pipeline_config/ALBDI-SM-2_sp_emit.json @@ -0,0 +1,33 @@ +{ + "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_emit", + "_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 73c52f6..cd2f571 100644 --- a/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json +++ b/configuration/pipeline_config/ALBDI-SM-2_sp_proc.json @@ -1,11 +1,11 @@ { "name": "ALBDI-SM-2_sp_proc", "pipeline_type": "stream", - "input_pipeline": "ALBDI-SM-2_sp", + "input_pipeline": "ALBDI-SM-2_sp_emit", "mode": "PUB", "block": false, "function": "epics_forwarder_sp.py", - "max_frame_rate": 10.1, + "_max_frame_rate": 10.1, "throw_epics_errors": true, "abort_on_timeout": true, "stream_timeout": 60 diff --git a/configuration/pipeline_config/emmitance_pipolar.json b/configuration/pipeline_config/emittance_pipolar.json similarity index 84% rename from configuration/pipeline_config/emmitance_pipolar.json rename to configuration/pipeline_config/emittance_pipolar.json index 4ccdd26..c1c844a 100644 --- a/configuration/pipeline_config/emmitance_pipolar.json +++ b/configuration/pipeline_config/emittance_pipolar.json @@ -7,10 +7,10 @@ "image_slices": null, "pipeline_type": "processing", "copy": true, - "name": "emmitance_pipolar", + "name": "emittance_pipolar", "function": "pipolar.py", - "camera_name": "ALBDI-SM-2", - "_camera_name": "source_h5", + "_camera_name": "ALBDI-SM-2", + "camera_name": "source_h5", "fit": { "delta_height": 50, "bg_range_low": [ diff --git a/configuration/pipeline_config/permanent_instances.json b/configuration/pipeline_config/permanent_instances.json index 8bbe150..1cdbef0 100644 --- a/configuration/pipeline_config/permanent_instances.json +++ b/configuration/pipeline_config/permanent_instances.json @@ -7,6 +7,7 @@ "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", @@ -23,5 +24,5 @@ "ARS05-RCAM-0310_proc2": "ARS05-RCAM-0310_proc2", "X01DD-FE-CAM1_proc": "X01DD-FE-CAM1_proc", "X08DB-FE-CAM1_proc": "X08DB-FE-CAM1_proc", - "emmitance_pipolar": "emmitance_pipolar" + "emittance_pipolar": "emittance_pipolar" } \ No newline at end of file diff --git a/configuration/pipeline_config/servers.json b/configuration/pipeline_config/servers.json index 3c4d4fb..24b387d 100644 --- a/configuration/pipeline_config/servers.json +++ b/configuration/pipeline_config/servers.json @@ -35,7 +35,8 @@ "expanding": false, "instances": [ "ALIDI-SM-5_sp_proc", - "emmitance_pipolar:9001" + "ALBDI-SM-2_sp_proc", + "ALBDI-SM-2_emittance:9001" ] }, "http://sls-daqsync-43.psi.ch:8881": { diff --git a/configuration/user_scripts/pipolar.py b/configuration/user_scripts/pipolar.py index 0ed25f0..692d10e 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.97634439, 20.84823973, 15.30617974, 12.12078244, 10.04998987, 8.59541134, 7.517605624, 6.687085031, 6.027635302, 5.491463995, 5.047070496, 4.67284665, 4.353472754, 4.077788974, 3.837472599, 3.439012834, 3.122374348, 2.86497533, 2.651841232] - sig = [0.0, 3.7, 5.2, 6.3, 7.3, 8.2, 9.0, 9.7, 10.3, 11.0, 11.6, 12.1, 12.7, 13.2, 13.7, 14.2, 15.2, 16, 16.8, 17.5] + 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] sig2 = [element * element for element in sig] x = np.linspace(0, 999999, 999999) x = [(1+val)/1000000*max(ipv) for val in x]