diff --git a/configuration/camera_config/DET-FURKA-1.json b/configuration/camera_config/DET-FURKA-1.json new file mode 100644 index 0000000..aaac17e --- /dev/null +++ b/configuration/camera_config/DET-FURKA-1.json @@ -0,0 +1,14 @@ +{ + "name": "DET-FURKA-1", + "camera_calibration": null, + "source_type": "array10", + "_check_data": true, + "source": "tcp://sf-daq-6.psi.ch:20000", + "rotate": 0, + "mirror_y": false, + "mirror_x": false, + "group": [ + "Furka" + ], + "alias": [] +} \ No newline at end of file diff --git a/configuration/camera_config/SARBD01-DSCR050.json b/configuration/camera_config/SARBD01-DSCR050.json index eee2e79..ad1d0bb 100644 --- a/configuration/camera_config/SARBD01-DSCR050.json +++ b/configuration/camera_config/SARBD01-DSCR050.json @@ -1,21 +1,24 @@ { - "name": "SARBD01-DSCR050", - "camera_calibration": { - "angle_horizontal": 8.0, - "angle_vertical": 0.0, - "reference_marker_height": 16000.0, - "reference_marker": [ - 908, - 204, - 1609, - 2068 - ], - "reference_marker_width": 6000.0 - }, - "source": "SARBD01-DSCR050", - "mirror_y": true, - "rotate": 0, - "mirror_x": true, - "group": ["Electrons"], - "alias": [] -} + "name": "SARBD01-DSCR050", + "camera_calibration": { + "angle_horizontal": 8.0, + "angle_vertical": 0.0, + "reference_marker_height": 16000.0, + "reference_marker": [ + 908, + 204, + 1609, + 2068 + ], + "reference_marker_width": 6000.0 + }, + "source": "SARBD01-DSCR050", + "mirror_y": true, + "rotate": 0, + "mirror_x": true, + "group": [ + "Electrons" + ], + "source_type": "bsread", + "alias": [] +} \ No newline at end of file diff --git a/configuration/camera_config/SARBD01-DSCR110.json b/configuration/camera_config/SARBD01-DSCR110.json index 1e03ca3..78bbfaf 100644 --- a/configuration/camera_config/SARBD01-DSCR110.json +++ b/configuration/camera_config/SARBD01-DSCR110.json @@ -16,6 +16,9 @@ "rotate": 0, "name": "SARBD01-DSCR110", "source": "SARBD01-DSCR110", - "group": ["Electrons"], + "source_type": "bsread", + "group": [ + "Electrons" + ], "alias": [] -} +} \ No newline at end of file diff --git a/configuration/camera_config/SARBD02-DSCR050.json b/configuration/camera_config/SARBD02-DSCR050.json index 76e43cf..3bb16ab 100644 --- a/configuration/camera_config/SARBD02-DSCR050.json +++ b/configuration/camera_config/SARBD02-DSCR050.json @@ -1,21 +1,24 @@ { - "name": "SARBD02-DSCR050", - "camera_calibration": { - "angle_horizontal": 8.0, - "angle_vertical": 0.0, - "reference_marker_height": 16000.0, - "reference_marker": [ - 940, - 170, - 1620, - 1981 - ], - "reference_marker_width": 6000.0 - }, - "source": "SARBD02-DSCR050", - "mirror_y": true, - "rotate": 0, - "mirror_x": true, - "group": ["Electrons"], - "alias": [] -} + "name": "SARBD02-DSCR050", + "camera_calibration": { + "angle_horizontal": 8.0, + "angle_vertical": 0.0, + "reference_marker_height": 16000.0, + "reference_marker": [ + 940, + 170, + 1620, + 1981 + ], + "reference_marker_width": 6000.0 + }, + "source": "SARBD02-DSCR050", + "source_type": "bsread", + "mirror_y": true, + "rotate": 0, + "mirror_x": true, + "group": [ + "Electrons" + ], + "alias": [] +} \ No newline at end of file diff --git a/configuration/camera_config/SARES11-SPEC125-M3.json b/configuration/camera_config/SARES11-SPEC125-M3.json new file mode 100644 index 0000000..367ae37 --- /dev/null +++ b/configuration/camera_config/SARES11-SPEC125-M3.json @@ -0,0 +1,32 @@ +{ + "camera_calibration": { + "reference_marker": [ + 0, + 0, + 100, + 100 + ], + "reference_marker_width": 100.0, + "reference_marker_height": 100.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", + "name": "SARES11-SPEC125-M3", + "prefix": "SARES11-SPEC125-M3", + "source": "SARES11-SPEC125-M3", + "connections": 2, + "buffer_size": 0, + "forwarder_port": 9006, + "debug": true, + "protocol": "tcp", + "group": [ + "Photonics", + "Alvra" + ] +} \ No newline at end of file diff --git a/configuration/camera_config/SARES20-CAMS142-C1.json b/configuration/camera_config/SARES20-CAMS142-C1.json index 0971bd9..48e8eaa 100644 --- a/configuration/camera_config/SARES20-CAMS142-C1.json +++ b/configuration/camera_config/SARES20-CAMS142-C1.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 913, - 589, - 915, - 591 + 1241, + 455, + 1342, + 558 ], - "reference_marker_width": 3.2, - "reference_marker_height": 3.2, + "reference_marker_width": 53.0, + "reference_marker_height": 77.504, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, @@ -21,7 +21,7 @@ "name": "SARES20-CAMS142-C1", "source": "SARES20-CAMS142-C1", "alias": [ - "SAMPLECAM_INLINE" + "SAMPLECAM_TOPVIEW (SARES20-CAMS142-C1)" ], "group": [ "Photonics", diff --git a/configuration/camera_config/SARES20-CAMS142-C2.json b/configuration/camera_config/SARES20-CAMS142-C2.json index 4b66cdc..1840536 100644 --- a/configuration/camera_config/SARES20-CAMS142-C2.json +++ b/configuration/camera_config/SARES20-CAMS142-C2.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 1026, - 842, - 1036, - 852 + 1184, + 1196, + 1186, + 1198 ], - "reference_marker_width": 50.0, - "reference_marker_height": 50.0, + "reference_marker_width": 16.71604938271605, + "reference_marker_height": 16.666666666666668, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, @@ -24,5 +24,7 @@ "Photonics", "Bernina" ], - "alias": [] + "alias": [ + "SAMPLECAM_INLINE (SARES20-CAMS142-C2)" + ] } \ No newline at end of file diff --git a/configuration/camera_config/SARES20-CAMS142-M1.json b/configuration/camera_config/SARES20-CAMS142-M1.json index 0288f8a..f96c126 100644 --- a/configuration/camera_config/SARES20-CAMS142-M1.json +++ b/configuration/camera_config/SARES20-CAMS142-M1.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 1463, - 735, - 1465, - 737 + 572, + 396, + 574, + 398 ], - "reference_marker_width": 2, - "reference_marker_height": 2, + "reference_marker_width": 2.0, + "reference_marker_height": 2.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, @@ -25,5 +25,7 @@ "Photonics", "Bernina" ], - "alias": [] + "alias": [ + "SAMPLECAM_SIDEVIEW (SARES20-CAMS142-M1)" + ] } \ No newline at end of file diff --git a/configuration/camera_config/SARES20-CAMS142-M4.json b/configuration/camera_config/SARES20-CAMS142-M4.json index bb7fae1..1662edc 100644 --- a/configuration/camera_config/SARES20-CAMS142-M4.json +++ b/configuration/camera_config/SARES20-CAMS142-M4.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 0, - 0, - 1, - 1 + 1244, + 613, + 1344, + 715 ], - "reference_marker_width": 1.0, - "reference_marker_height": 1.0, + "reference_marker_width": 38.0, + "reference_marker_height": 49.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, diff --git a/configuration/camera_config/SARES20-CAMS142-M5.json b/configuration/camera_config/SARES20-CAMS142-M5.json index e3212ce..ae7901e 100644 --- a/configuration/camera_config/SARES20-CAMS142-M5.json +++ b/configuration/camera_config/SARES20-CAMS142-M5.json @@ -28,7 +28,7 @@ "Bernina" ], "alias": [ - "TT_KB (SARES20-CAMS142-M5)" + "TT_KB (SARES20-CAMS142-M5)(SARES20-CAMS142-M5)" ], "roi_signal": [ 10, diff --git a/configuration/camera_config/SARES20-DSDPPRM.json b/configuration/camera_config/SARES20-DSDPPRM.json index 36d7bf0..d392b46 100644 --- a/configuration/camera_config/SARES20-DSDPPRM.json +++ b/configuration/camera_config/SARES20-DSDPPRM.json @@ -26,6 +26,6 @@ "Bernina" ], "alias": [ - "PROF_DSD (SARES20-DSDPPRM)" + "PROF_DSD (SARES20-DSDPPRM) (SARES20-DSDPPRM)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SARES20-PROF141-M1.json b/configuration/camera_config/SARES20-PROF141-M1.json index 9406f91..bbfc0f3 100644 --- a/configuration/camera_config/SARES20-PROF141-M1.json +++ b/configuration/camera_config/SARES20-PROF141-M1.json @@ -26,6 +26,6 @@ "Bernina" ], "alias": [ - "PROF_KB (SARES20-PROF141-M1)" + "PROF_KB (SARES20-PROF141-M1) (SARES20-PROF141-M1)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SARES20-PROF142-M1.json b/configuration/camera_config/SARES20-PROF142-M1.json index 729d8d5..05bcde3 100644 --- a/configuration/camera_config/SARES20-PROF142-M1.json +++ b/configuration/camera_config/SARES20-PROF142-M1.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 74, - 37, - 479, - 431 + 212, + 313, + 707, + 807 ], - "reference_marker_width": 300.0, - "reference_marker_height": 300.0, + "reference_marker_width": 100.0, + "reference_marker_height": 100.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, @@ -24,7 +24,8 @@ "Photonics", "Bernina" ], + "forwarder_port": 9042, "alias": [ - "XEYE (SARES20-PROF142-M1)" + "XEYE (SARES20-PROF142-M1) (SARES20-PROF142-M1)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SARES30-CAMS156-SMX-OAV.json b/configuration/camera_config/SARES30-CAMS156-SMX-OAV.json index 0e38826..b502288 100644 --- a/configuration/camera_config/SARES30-CAMS156-SMX-OAV.json +++ b/configuration/camera_config/SARES30-CAMS156-SMX-OAV.json @@ -16,9 +16,10 @@ "rotate": 0, "roi": null, "image_background": null, - "source_type": "epics", + "source_type": "bsread", "name": "SARES30-CAMS156-SMX-OAV", "source": "SARES30-CAMS156-SMX-OAV", "group": "Cristallina", + "forwarder_port": 9004, "alias": [] } \ No newline at end of file diff --git a/configuration/camera_config/SARES30-CAMS156-XE.json b/configuration/camera_config/SARES30-CAMS156-XE.json index 1c97a4e..c6bfd76 100644 --- a/configuration/camera_config/SARES30-CAMS156-XE.json +++ b/configuration/camera_config/SARES30-CAMS156-XE.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 656, - 416, - 1066, - 823 + 325, + 149, + 1132, + 953 ], - "reference_marker_width": 200.0, - "reference_marker_height": 200.0, + "reference_marker_width": 400.0, + "reference_marker_height": 400.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, diff --git a/configuration/camera_config/SARFE10-PPRM064.json b/configuration/camera_config/SARFE10-PPRM064.json index 895643b..c105cdd 100644 --- a/configuration/camera_config/SARFE10-PPRM064.json +++ b/configuration/camera_config/SARFE10-PPRM064.json @@ -26,7 +26,7 @@ "Beamline Aramis" ], "alias": [ - "PROF_FE (SARFE10-PPRM064)" + "PROF_FE (SARFE10-PPRM064) (SARFE10-PPRM064)" ], "forwarder_port": 9015 } \ No newline at end of file diff --git a/configuration/camera_config/SARFE10-PSSS059-LB.json b/configuration/camera_config/SARFE10-PSSS059-LB.json index 0edddb1..b5725f7 100644 --- a/configuration/camera_config/SARFE10-PSSS059-LB.json +++ b/configuration/camera_config/SARFE10-PSSS059-LB.json @@ -13,7 +13,7 @@ }, "mirror_x": false, "mirror_y": false, - "rotate": 0, + "rotate": 1, "roi": null, "image_background": null, "source_type": "bsread", diff --git a/configuration/camera_config/SARFE10-PSSS059.json b/configuration/camera_config/SARFE10-PSSS059.json index 02857f2..412922a 100644 --- a/configuration/camera_config/SARFE10-PSSS059.json +++ b/configuration/camera_config/SARFE10-PSSS059.json @@ -33,5 +33,6 @@ ], "alias": [], "protocol": "tcp", - "_forwarder_port": 8890 + "_forwarder_port": 8890, + "forwarder_port": 9090 } \ No newline at end of file diff --git a/configuration/camera_config/SAROP11-PPRM066.json b/configuration/camera_config/SAROP11-PPRM066.json index 35e80a4..2d62dfd 100644 --- a/configuration/camera_config/SAROP11-PPRM066.json +++ b/configuration/camera_config/SAROP11-PPRM066.json @@ -23,6 +23,6 @@ "Photonics" ], "alias": [ - "PROF_MIRR_ALV1 (SAROP11-PPRM066)" + "PROF_MIRR_ALV1 (SAROP11-PPRM066) (SAROP11-PPRM066)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SAROP21-PPRM094.json b/configuration/camera_config/SAROP21-PPRM094.json index 501a0a9..a2bb106 100644 --- a/configuration/camera_config/SAROP21-PPRM094.json +++ b/configuration/camera_config/SAROP21-PPRM094.json @@ -25,6 +25,6 @@ "Beamline Aramis" ], "alias": [ - "PROF_MIRR1 (SAROP21-PPRM094)" + "PROF_MIRR1 (SAROP21-PPRM094) (SAROP21-PPRM094)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SAROP21-PPRM113.json b/configuration/camera_config/SAROP21-PPRM113.json index 5d798ce..13ec9d9 100644 --- a/configuration/camera_config/SAROP21-PPRM113.json +++ b/configuration/camera_config/SAROP21-PPRM113.json @@ -24,7 +24,7 @@ "Beamline Aramis" ], "alias": [ - "PROF_MONO (SAROP21-PPRM113)" + "PROF_MONO (SAROP21-PPRM113) (SAROP21-PPRM113)" ], "source": "SAROP21-PPRM113", "forwarder_port": 9040 diff --git a/configuration/camera_config/SAROP21-PPRM133.json b/configuration/camera_config/SAROP21-PPRM133.json index 0c48512..fdfb070 100644 --- a/configuration/camera_config/SAROP21-PPRM133.json +++ b/configuration/camera_config/SAROP21-PPRM133.json @@ -25,6 +25,6 @@ ], "forwarder_port": 9019, "alias": [ - "PROF_OPT (SAROP21-PPRM133)" + "PROF_OPT (SAROP21-PPRM133) (SAROP21-PPRM133)" ] } \ No newline at end of file diff --git a/configuration/camera_config/SAROP21-PPRM138.json b/configuration/camera_config/SAROP21-PPRM138.json index 6804ec4..9edaa53 100644 --- a/configuration/camera_config/SAROP21-PPRM138.json +++ b/configuration/camera_config/SAROP21-PPRM138.json @@ -23,7 +23,7 @@ "Bernina" ], "alias": [ - "PROF_ATT (SAROP21-PPRM138)" + "PROF_ATT (SAROP21-PPRM138) (SAROP21-PPRM138)" ], "name": "SAROP21-PPRM138", "source": "SAROP21-PPRM138" diff --git a/configuration/camera_config/SAROP31-PPRM113.json b/configuration/camera_config/SAROP31-PPRM113.json index 7de92f8..f270415 100644 --- a/configuration/camera_config/SAROP31-PPRM113.json +++ b/configuration/camera_config/SAROP31-PPRM113.json @@ -8,7 +8,7 @@ ], "reference_marker_width": 4000.0, "reference_marker_height": 4000.0, - "angle_horizontal": 21.0, + "angle_horizontal": 0, "angle_vertical": 0.0 }, "mirror_x": true, diff --git a/configuration/camera_config/SATBD01-DSCR120.json b/configuration/camera_config/SATBD01-DSCR120.json index 5a84d4a..cb61f5e 100644 --- a/configuration/camera_config/SATBD01-DSCR120.json +++ b/configuration/camera_config/SATBD01-DSCR120.json @@ -16,7 +16,7 @@ "rotate": 0, "roi": null, "image_background": null, - "source_type": "epics", + "source_type": "bsread", "name": "SATBD01-DSCR120", "source": "SATBD01-DSCR120", "group": [ diff --git a/configuration/camera_config/SATBD01-DSCR210.json b/configuration/camera_config/SATBD01-DSCR210.json index d3196d7..88e601d 100644 --- a/configuration/camera_config/SATBD01-DSCR210.json +++ b/configuration/camera_config/SATBD01-DSCR210.json @@ -16,7 +16,7 @@ "rotate": 0, "roi": null, "image_background": null, - "source_type": "epics", + "source_type": "bsread", "source": "SATBD01-DSCR210", "name": "SATBD01-DSCR210", "group": [ diff --git a/configuration/camera_config/SATBD02-DSCR050.json b/configuration/camera_config/SATBD02-DSCR050.json index 57c80b5..6aba910 100644 --- a/configuration/camera_config/SATBD02-DSCR050.json +++ b/configuration/camera_config/SATBD02-DSCR050.json @@ -1,10 +1,10 @@ { "camera_calibration": { "reference_marker": [ - 618, - 166, - 1305, - 1984 + 727, + 100, + 1392, + 1898 ], "reference_marker_width": 6000.0, "reference_marker_height": 16000.0, diff --git a/configuration/camera_config/SATDI01-DSCR040.json b/configuration/camera_config/SATDI01-DSCR040.json index 81e7778..835c96a 100644 --- a/configuration/camera_config/SATDI01-DSCR040.json +++ b/configuration/camera_config/SATDI01-DSCR040.json @@ -1,14 +1,14 @@ { "camera_calibration": { "reference_marker": [ - 207, - 101, - 827, - 693 + 302, + 436, + 973, + 662 ], - "reference_marker_width": 19500.0, - "reference_marker_height": 19500.0, - "angle_horizontal": 0.0, + "reference_marker_width": 6000.0, + "reference_marker_height": 2000.0, + "angle_horizontal": 8.0, "angle_vertical": 0.0 }, "mirror_x": false, @@ -17,7 +17,7 @@ "roi": null, "image_background": null, "source_type": "epics", - "source": "SATDI01-DSCR040", + "source": "SATDI01-DSCR040:RF", "name": "SATDI01-DSCR040", "group": [ "Electrons", diff --git a/configuration/camera_config/SATDI01-DSCR065.json b/configuration/camera_config/SATDI01-DSCR065.json index f351c00..79ff047 100644 --- a/configuration/camera_config/SATDI01-DSCR065.json +++ b/configuration/camera_config/SATDI01-DSCR065.json @@ -1,14 +1,14 @@ { "camera_calibration": { "reference_marker": [ - 687, - 484, - 734, - 532 + 563, + 420, + 730, + 588 ], "reference_marker_width": 1400.0, "reference_marker_height": 1400.0, - "angle_horizontal": 0.0, + "angle_horizontal": 8.0, "angle_vertical": 0.0 }, "mirror_x": false, @@ -17,7 +17,7 @@ "roi": null, "image_background": null, "source_type": "epics", - "source": "SATDI01-DSCR065", + "source": "SATDI01-DSCR065:RF", "name": "SATDI01-DSCR065", "group": [ "Electrons", diff --git a/configuration/camera_config/SATES30-CAMS182-GIGE1.json b/configuration/camera_config/SATES30-CAMS182-GIGE1.json index 74d0aa8..59ea77e 100644 --- a/configuration/camera_config/SATES30-CAMS182-GIGE1.json +++ b/configuration/camera_config/SATES30-CAMS182-GIGE1.json @@ -1,12 +1,12 @@ { "camera_calibration": { "reference_marker": [ - 340, - 244, - 355, - 321 + 311, + 202, + 344, + 258 ], - "reference_marker_width": 1000.0, + "reference_marker_width": 5000.0, "reference_marker_height": 5000.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 diff --git a/configuration/camera_config/SATOP11-PSAS079.json b/configuration/camera_config/SATOP11-PSAS079.json new file mode 100644 index 0000000..187d50f --- /dev/null +++ b/configuration/camera_config/SATOP11-PSAS079.json @@ -0,0 +1,22 @@ +{ + "camera_calibration": { + "reference_marker": [ + 0, + 0, + 100, + 100 + ], + "reference_marker_width": 100.0, + "reference_marker_height": 100.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, + "mirror_x": false, + "mirror_y": false, + "rotate": 0, + "roi": null, + "image_background": null, + "source_type": "epics", + "source": "SATOP11-PSAS079", + "name": "SATOP11-PSAS079" +} \ No newline at end of file diff --git a/configuration/camera_config/SATUN04-DSCR020.json b/configuration/camera_config/SATUN04-DSCR020.json index 9cd24ec..9779c5c 100644 --- a/configuration/camera_config/SATUN04-DSCR020.json +++ b/configuration/camera_config/SATUN04-DSCR020.json @@ -1,14 +1,14 @@ { "camera_calibration": { "reference_marker": [ - 599, - 193, - 915, - 816 + 432, + 156, + 1042, + 744 ], - "reference_marker_width": 9750.0, - "reference_marker_height": 19500.0, - "angle_horizontal": 0.0, + "reference_marker_width": 19000.0, + "reference_marker_height": 18000.0, + "angle_horizontal": 8.0, "angle_vertical": 0.0 }, "mirror_x": false, @@ -17,7 +17,7 @@ "roi": null, "image_background": null, "source_type": "epics", - "source": "SATUN04-DSCR020", + "source": "SATUN04-DSCR020:RF", "name": "SATUN04-DSCR020", "group": [ "Electrons" diff --git a/configuration/camera_config/SATUN04-DSCR050.json b/configuration/camera_config/SATUN04-DSCR050.json index ba46c37..5cb9689 100644 --- a/configuration/camera_config/SATUN04-DSCR050.json +++ b/configuration/camera_config/SATUN04-DSCR050.json @@ -6,9 +6,9 @@ 916, 775 ], - "reference_marker_width": 9750.0, - "reference_marker_height": 19500.0, - "angle_horizontal": 0.0, + "reference_marker_width": 9500.0, + "reference_marker_height": 19000.0, + "angle_horizontal": 8.0, "angle_vertical": 0.0 }, "mirror_x": false, @@ -17,7 +17,7 @@ "roi": null, "image_background": null, "source_type": "epics", - "source": "SATUN04-DSCR050", + "source": "SATUN04-DSCR050:RF", "name": "SATUN04-DSCR050", "group": [ "Electrons" diff --git a/configuration/camera_config/SLAAR21-LCAM-C532.json b/configuration/camera_config/SLAAR21-LCAM-C532.json index 5ff9534..568cab5 100644 --- a/configuration/camera_config/SLAAR21-LCAM-C532.json +++ b/configuration/camera_config/SLAAR21-LCAM-C532.json @@ -1,13 +1,13 @@ { "camera_calibration": { "reference_marker": [ - 1199, - 1034, - 1361, - 1054 + 894, + 929, + 1256, + 1001 ], - "reference_marker_width": 1000.0, - "reference_marker_height": 123.0, + "reference_marker_width": 2011.0, + "reference_marker_height": 400.0, "angle_horizontal": 0.0, "angle_vertical": 0.0 }, @@ -24,8 +24,6 @@ "Bernina", "Laser" ], - "alias": [ - "SAMPLECAM_SIDEVIEW (SLAAR21-LCAM-C532)" - ], + "alias": [], "prefix": "SLAAR21-LCAM-C532" } \ No newline at end of file diff --git a/configuration/camera_config/SLAAR21-LCAM-CS841.json b/configuration/camera_config/SLAAR21-LCAM-CS841.json index 06444e8..7e1fdf3 100644 --- a/configuration/camera_config/SLAAR21-LCAM-CS841.json +++ b/configuration/camera_config/SLAAR21-LCAM-CS841.json @@ -1,5 +1,16 @@ { - "camera_calibration": null, + "camera_calibration": { + "reference_marker": [ + 0, + 0, + 0, + 0 + ], + "reference_marker_width": 30000.0, + "reference_marker_height": 30000.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, "mirror_x": false, "mirror_y": true, "rotate": 0, diff --git a/configuration/camera_config/SLAAR21-LCAM-CS843.json b/configuration/camera_config/SLAAR21-LCAM-CS843.json index 9b145b8..6b000cd 100644 --- a/configuration/camera_config/SLAAR21-LCAM-CS843.json +++ b/configuration/camera_config/SLAAR21-LCAM-CS843.json @@ -1,8 +1,21 @@ { - "camera_calibration": null, + "camera_calibration": { + "reference_marker": [ + 52, + 43, + 61, + 51 + ], + "reference_marker_width": 30000.0, + "reference_marker_height": 30000.0, + "angle_horizontal": 0.0, + "angle_vertical": 0.0 + }, "mirror_x": false, "mirror_y": true, "rotate": 0, + "roi": null, + "image_background": null, "source_type": "bsread", "name": "SLAAR21-LCAM-CS843", "protocol": "tcp", diff --git a/configuration/camera_config/permanent_instances.json b/configuration/camera_config/permanent_instances.json index be744ad..496466b 100644 --- a/configuration/camera_config/permanent_instances.json +++ b/configuration/camera_config/permanent_instances.json @@ -7,15 +7,19 @@ "SARCL01-DSCR170": "SARCL01-DSCR170", "SARES11-SPEC125-M1": "SARES11-SPEC125-M1", "SARES11-SPEC125-M2": "SARES11-SPEC125-M2", + "SARES11-SPEC125-M3": "SARES11-SPEC125-M3", "SARES20-CAMS142-M1": "SARES20-CAMS142-M1", "SARES20-CAMS142-M2": "SARES20-CAMS142-M2", + "SARES20-CAMS142-M4": "SARES20-CAMS142-M4", "SARES20-CAMS142-M5": "SARES20-CAMS142-M5", "SARES20-DSDPPRM": "SARES20-DSDPPRM", "SARES20-PROF142-M1": "SARES20-PROF142-M1", + "SARES30-CAMS156-SMX-OAV": "SARES30-CAMS156-SMX-OAV", "SARES30-CAMS156-XE": "SARES30-CAMS156-XE", "SARFE10-PPRM064": "SARFE10-PPRM064", "SARFE10-PSSS059": "SARFE10-PSSS059", "SARFE10-PSSS059-LB": "SARFE10-PSSS059-LB", + "SAROP11-PPRM122": "SAROP11-PPRM122", "SAROP31-PPRM150": "SAROP31-PPRM150", "SATBD02-DSCR050": "SATBD02-DSCR050", "SATES21-CAMS-PATT1": "SATES21-CAMS-PATT1", diff --git a/configuration/camera_config/servers.json b/configuration/camera_config/servers.json index d186828..6e8d2db 100644 --- a/configuration/camera_config/servers.json +++ b/configuration/camera_config/servers.json @@ -40,7 +40,8 @@ "SATBD01-DSCR120", "S10BD01-DSCR030", "SATBD02-DSCR050", - "SARCL01-DSCR170" + "SARCL01-DSCR170", + "SARBD02-DSCR050" ] }, "http://sf-daqsync-11.psi.ch:8880": { @@ -75,12 +76,14 @@ "instances": [ "SARES11-SPEC125-M1", "SARES11-SPEC125-M2", + "SARES11-SPEC125-M3", "SARES11-XMI125-C4P1", "SARES11-XPR125-C4P2", "SARES12-XPR128-C4F1", "#SLAAR11-LCAM-C452", "#SLAAR11-LCAM-C421", - "#SARES12-CAMS128-M1" + "#SARES12-CAMS128-M1", + "SAROP11-PPRM122" ] }, "http://sf-daqsync-14.psi.ch:8880": { @@ -119,7 +122,8 @@ "instances": [ "SAROP31-PPRM113", "SAROP31-PPRM150", - "SARES30-CAMS156-XE" + "SARES30-CAMS156-XE", + "SARES30-CAMS156-SMX-OAV" ] }, "http://sf-daqsync-17.psi.ch:8880": { @@ -132,6 +136,8 @@ "http://sf-daqsync-18.psi.ch:8880": { "enabled": true, "expanding": false, - "instances": [] + "instances": [ + "DET-FURKA-1:9010" + ] } } \ No newline at end of file diff --git a/configuration/camera_config/simulation_2.json b/configuration/camera_config/simulation_2.json index 79de2c9..e9df691 100644 --- a/configuration/camera_config/simulation_2.json +++ b/configuration/camera_config/simulation_2.json @@ -1,10 +1,10 @@ { "camera_calibration": { "reference_marker": [ - 211, - 173, - 1063, - 793 + 169, + 134, + 464, + 312 ], "reference_marker_width": 30000.0, "reference_marker_height": 30000.0, @@ -14,13 +14,16 @@ "mirror_x": false, "mirror_y": false, "rotate": 0, + "roi": null, + "image_background": null, "source_type": "simulation", "name": "simulation_2", "source": "", "frame_rate": 5, - "size_x": 20, - "size_y": 20, + "size_x": 640, + "size_y": 480, "simulate_pulse_id": true, "dtype": "uint16", - "image_type": "static_raw" + "_image_type": "raw", + "no_client_timeout": 0 } \ No newline at end of file diff --git a/configuration/pipeline_config/DET-FURKA-1_sp.json b/configuration/pipeline_config/DET-FURKA-1_sp.json new file mode 100644 index 0000000..8982033 --- /dev/null +++ b/configuration/pipeline_config/DET-FURKA-1_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": "DET-FURKA-1", + "name": "DET-FURKA-1_sp" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SARBD01-DSCR050_sp.json b/configuration/pipeline_config/SARBD01-DSCR050_sp.json index 9a2069c..b2eefd8 100644 --- a/configuration/pipeline_config/SARBD01-DSCR050_sp.json +++ b/configuration/pipeline_config/SARBD01-DSCR050_sp.json @@ -6,5 +6,6 @@ "image_good_region": null, "image_slices": null, "camera_name": "SARBD01-DSCR050", - "name": "SARBD01-DSCR050_sp" + "name": "SARBD01-DSCR050_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SARBD01-DSCR110_sp.json b/configuration/pipeline_config/SARBD01-DSCR110_sp.json index b943fe1..fb89362 100644 --- a/configuration/pipeline_config/SARBD01-DSCR110_sp.json +++ b/configuration/pipeline_config/SARBD01-DSCR110_sp.json @@ -6,5 +6,6 @@ "image_good_region": null, "image_slices": null, "camera_name": "SARBD01-DSCR110", - "name": "SARBD01-DSCR110_sp" + "name": "SARBD01-DSCR110_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SARBD02-DSCR050_sp.json b/configuration/pipeline_config/SARBD02-DSCR050_sp.json index 82c7105..d5a55b4 100644 --- a/configuration/pipeline_config/SARBD02-DSCR050_sp.json +++ b/configuration/pipeline_config/SARBD02-DSCR050_sp.json @@ -7,5 +7,6 @@ "image_good_region": null, "image_slices": null, "camera_name": "SARBD02-DSCR050", - "name": "SARBD02-DSCR050_sp" + "name": "SARBD02-DSCR050_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SARES11-SPEC125-M1_psen_db.json b/configuration/pipeline_config/SARES11-SPEC125-M1_psen_db.json index 0f1c6de..daec940 100644 --- a/configuration/pipeline_config/SARES11-SPEC125-M1_psen_db.json +++ b/configuration/pipeline_config/SARES11-SPEC125-M1_psen_db.json @@ -1,6 +1,6 @@ { "image_background_enable": "passive", - "image_background": "SARES11-SPEC125-M1_20230817_171138_886383", + "image_background": "SARES11-SPEC125-M1_20231130_141405_968258", "image_threshold": null, "image_region_of_interest": null, "image_good_region": null, @@ -14,14 +14,14 @@ "roi_signal": [ 0, 2048, - 50, - 200 + 75, + 250 ], "roi_signal2": [ 0, 2048, 250, - 400 + 450 ], "no_client_timeout": 0, "port": "9013", diff --git a/configuration/pipeline_config/SARES11-SPEC125-M2_db.json b/configuration/pipeline_config/SARES11-SPEC125-M2_db.json index 39b6469..03db5d5 100644 --- a/configuration/pipeline_config/SARES11-SPEC125-M2_db.json +++ b/configuration/pipeline_config/SARES11-SPEC125-M2_db.json @@ -12,10 +12,10 @@ "mode": "PUSH", "allow_type_changes": false, "roi_signal": [ - 1350, - 1900, - 600, - 900 + 900, + 1800, + 450, + 600 ], "roi_background": [ 0, diff --git a/configuration/pipeline_config/SARES11-SPEC125-M3_sp.json b/configuration/pipeline_config/SARES11-SPEC125-M3_sp.json new file mode 100644 index 0000000..6d72f6d --- /dev/null +++ b/configuration/pipeline_config/SARES11-SPEC125-M3_sp.json @@ -0,0 +1,12 @@ +{ + "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": "SARES11-SPEC125-M3", + "name": "SARES11-SPEC125-M3_sp", + "max_frame_rate": 5.1 +} \ No newline at end of file diff --git a/configuration/pipeline_config/SARES11-SPEC125-M3_spec_db.json b/configuration/pipeline_config/SARES11-SPEC125-M3_spec_db.json new file mode 100644 index 0000000..1643ea2 --- /dev/null +++ b/configuration/pipeline_config/SARES11-SPEC125-M3_spec_db.json @@ -0,0 +1,41 @@ +{ + "image_background_enable": "passive", + "image_background": "SARES11-SPEC125-M3_20231206_163057_171952", + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "function": "SARES11-SPEC125-M3_spec.py", + "camera_name": "SARES11-SPEC125-M3", + "name": "SARES11-SPEC125-M3_spec_db", + "mode": "PUSH", + "allow_type_changes": false, + "roi_background": [ + 0, + 2048, + 0, + 300 + ], + "roi_signal": [ + 0, + 2048, + 350, + 650 + ], + "no_client_timeout": 0, + "pixel_bkg": 0, + "port": "9011", + "multiprocessing": false, + "_buffer_size": 5, + "processing_threads": 3, + "thread_buffer_size": 20, + "send_buffer_size": 50, + "block": false, + "debug": true, + "bsread_image_buf": 1000, + "bsread_data_buf": 1000, + "abort_on_timeout": true, + "receive_timeout": 10000, + "reload": true +} \ No newline at end of file diff --git a/configuration/pipeline_config/SARES12-CAMS128-M1_psen_db.json b/configuration/pipeline_config/SARES12-CAMS128-M1_psen_db.json index 8b309ab..19ac42d 100644 --- a/configuration/pipeline_config/SARES12-CAMS128-M1_psen_db.json +++ b/configuration/pipeline_config/SARES12-CAMS128-M1_psen_db.json @@ -1,6 +1,6 @@ { "image_background_enable": false, - "image_background": "SARES12-CAMS128-M1_20200604_125721_845028", + "image_background": "SARES11-SPEC125-M1_20231130_141208_527123", "image_threshold": null, "image_region_of_interest": null, "image_good_region": null, diff --git a/configuration/pipeline_config/SARES20-CAMS142-M4_psen_db.json b/configuration/pipeline_config/SARES20-CAMS142-M4_psen_db.json index 86a5ac0..5f99659 100644 --- a/configuration/pipeline_config/SARES20-CAMS142-M4_psen_db.json +++ b/configuration/pipeline_config/SARES20-CAMS142-M4_psen_db.json @@ -13,14 +13,16 @@ "allow_type_changes": false, "roi_background": [ 0, - 2048, - 200, - 200 + 2530, + 400, + 300 ], "roi_signal": [ 0, - 2048, - 1, - 200 - ] + 2530, + 560, + 20 + ], + "no_client_timeout": 0, + "port": "9001" } \ No newline at end of file diff --git a/configuration/pipeline_config/SARES30-CAMS156-SMX-OAV_db.json b/configuration/pipeline_config/SARES30-CAMS156-SMX-OAV_db.json new file mode 100644 index 0000000..39a4b37 --- /dev/null +++ b/configuration/pipeline_config/SARES30-CAMS156-SMX-OAV_db.json @@ -0,0 +1,30 @@ +{ + "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", + "function": "SARES30-CAMS156-SMX-OAV_jetprojections.py", + "camera_name": "SARES30-CAMS156-SMX-OAV", + "name": "SARES30-CAMS156-SMX-OAV_db", + "mode": "PUSH", + "allow_type_changes": false, + "roi_signal": [ + 1000, + 1700, + 200, + 400 + ], + "no_client_timeout": 0, + "pixel_bkg": 0, + "port": "9011", + "multiprocessing": false, + "_buffer_size": 5, + "processing_threads": 3, + "thread_buffer_size": 20, + "send_buffer_size": 50, + "block": false, + "debug": true +} \ No newline at end of file diff --git a/configuration/pipeline_config/SARFE10-PBPS053_proc.json b/configuration/pipeline_config/SARFE10-PBPS053_proc.json index 75fe0a1..e60889f 100644 --- a/configuration/pipeline_config/SARFE10-PBPS053_proc.json +++ b/configuration/pipeline_config/SARFE10-PBPS053_proc.json @@ -10,6 +10,14 @@ ], "mode": "PUB", "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": true, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, "function": "pbps.py", "reload": true, "no_client_timeout": 0, @@ -18,12 +26,12 @@ "down": "SARFE10-CVME-PHO6212:Lnk9Ch13-DATA-SUM", "right": "SARFE10-CVME-PHO6212:Lnk9Ch14-DATA-SUM", "left": "SARFE10-CVME-PHO6212:Lnk9Ch15-DATA-SUM", - "up_calib": 0.4431043021990881, - "down_calib": 0.44861010848801824, - "left_calib": 1.3615448721778467, - "right_calib": 0.8244048105341849, - "horiz_calib": -4.138467163258845, - "vert_calib": -7.32031820693029, + "up_calib": 0.9019792251279883, + "down_calib": 0.9101901672523649, + "left_calib": 2.8540405681826577, + "right_calib": 1.7025669687469098, + "horiz_calib": -4.139302732964825, + "vert_calib": -126.81245308629619, "uJ_calib": 834.5191797495979, "threshold": 0, "queue_length": 5000, @@ -61,9 +69,9 @@ 0.3 ], "calib_x_norm": [ - 0.07025212327140404, - -0.0012462108241688304, - -0.07472909231652602 + 0.062155212050384316, + -0.002481949209461889, + -0.08279673727713997 ], "calib_y_range": [ -0.3, @@ -71,20 +79,20 @@ 0.3 ], "calib_y_norm": [ - 0.042187829488269026, - 0.0012401079015752405, - -0.039775820593494916 + 0.0012158223507226945, + 0.0009895194352891898, + -0.0035155741753873913 ], "calib_time": "2022-11-28 16:19:37", - "calib_datetime": "2023-08-31 10:21:46", + "calib_datetime": "2023-11-06 10:34:27", "calib_x_norm_std": [ - 0.07680351209141797, - 0.07722551967470816, - 0.07812091566728012 + 0.1735115650061328, + 0.17207905200620544, + 0.1775636982193752 ], "calib_y_norm_std": [ - 0.05000413805124177, - 0.05045114189001346, - 0.05057255211433463 + 0.13451160000157428, + 0.1330699161650116, + 0.17699539123265604 ] } \ No newline at end of file diff --git a/configuration/pipeline_config/SARFE10-PSSS059-LB_psss.json b/configuration/pipeline_config/SARFE10-PSSS059-LB_psss.json new file mode 100644 index 0000000..3b35e60 --- /dev/null +++ b/configuration/pipeline_config/SARFE10-PSSS059-LB_psss.json @@ -0,0 +1,24 @@ +{ + "image_background_enable": false, + "image_background": "SARFE10-PSSS059_20230823_135245_228963", + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": null, + "image_slices": null, + "pipeline_type": "processing", + "camera_name": "SARFE10-PSSS059-LB", + "name": "SARFE10-PSSS059-LB_psss", + "function": "psss_2.py", + "mode": "PUSH", + "allow_type_changes": false, + "no_client_timeout": 0, + "reload": true, + "processing_threads": 6, + "thread_buffer_size": 30, + "abort_on_error": false, + "_enforce_pid": true, + "_enforce_timestamp": true, + "pixel_bkg": 1, + "e_axis_name": "SARFE10-PSSS059-LB:SPECTRUM_X", + "e_int_name": "SARFE10-PSSS059-LB:SPECTRUM_Y" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SARFE10-PSSS059_psss_avg.json b/configuration/pipeline_config/SARFE10-PSSS059_psss_avg.json index 7d62cc8..4ab85c4 100644 --- a/configuration/pipeline_config/SARFE10-PSSS059_psss_avg.json +++ b/configuration/pipeline_config/SARFE10-PSSS059_psss_avg.json @@ -11,6 +11,12 @@ ], "mode": "PUB", "allow_type_changes": false, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "function": "psss_avg", "no_client_timeout": 0, "port": "9005", @@ -19,8 +25,6 @@ "processing_threads": 6, "thread_buffer_size": 20, "send_buffer_size": 50, - "abort_on_error": false, "pixel_bkg": 1, - "block": false, "queue_length": 100 } \ No newline at end of file diff --git a/configuration/pipeline_config/SARFE10-PSSS059_sp_br.json b/configuration/pipeline_config/SARFE10-PSSS059_sp_br.json new file mode 100644 index 0000000..0745d9d --- /dev/null +++ b/configuration/pipeline_config/SARFE10-PSSS059_sp_br.json @@ -0,0 +1,26 @@ +{ + "name": "SARFE10-PSSS059_sp_br", + "pipeline_type": "stream", + "bsread_address": "", + "bsread_channels": [ + "SARFE10-PSSS059:FIT-FWHM", + "SARFE10-PBPG050:FAST-PULSE-ENERGY" + ], + "intensity": "SARFE10-PBPG050:FAST-PULSE-ENERGY", + "FWHM": "SARFE10-PSSS059:FIT-FWHM", + "out_PV": "SARFE10-PSSS059:FIT-BRT", + "mode": "PUB", + "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": true, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, + "function": "spectral_brightness_test.py", + "reload": true, + "no_client_timeout": 0, + "port": "9005" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP11-ATT01_proc.json b/configuration/pipeline_config/SAROP11-ATT01_proc.json index 2c33243..42b46e8 100644 --- a/configuration/pipeline_config/SAROP11-ATT01_proc.json +++ b/configuration/pipeline_config/SAROP11-ATT01_proc.json @@ -11,11 +11,17 @@ "device": "SAROP11-ATT01", "mode": "PUB", "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, "name": "SAROP11-ATT01_proc", "no_client_timeout": 0, "pipeline_type": "stream", - "abort_on_timeout": true, - "stream_timeout": 20, "calib": 1, "step_length": 50, "edge_type": "falling", diff --git a/configuration/pipeline_config/SAROP11-PBPS110_proc.json b/configuration/pipeline_config/SAROP11-PBPS110_proc.json index 89b100b..503d960 100644 --- a/configuration/pipeline_config/SAROP11-PBPS110_proc.json +++ b/configuration/pipeline_config/SAROP11-PBPS110_proc.json @@ -1,7 +1,5 @@ { "pipeline_type": "stream", - "abort_on_timeout": true, - "stream_timeout": 20, "name": "SAROP11-PBPS110_proc", "bsread_address": "", "bsread_channels": [ @@ -12,6 +10,14 @@ ], "mode": "PUB", "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, "function": "pbps.py", "reload": true, "no_client_timeout": 0, @@ -20,12 +26,12 @@ "down": "SAROP11-CVME-PBPS2:Lnk9Ch11-DATA-SUM", "right": "SAROP11-CVME-PBPS2:Lnk9Ch14-DATA-SUM", "left": "SAROP11-CVME-PBPS2:Lnk9Ch15-DATA-SUM", - "up_calib": 0.5667819233673512, - "down_calib": 0.6894526330468388, - "left_calib": 0.3986116651107818, - "right_calib": 0.4440949148202752, - "horiz_calib": -4.757387343587321, - "vert_calib": 4.6493267695157385, + "up_calib": 7.852328164299955, + "down_calib": 9.359921504121692, + "left_calib": 7.8359272358887235, + "right_calib": 8.95233298718808, + "horiz_calib": -5.177498736180698, + "vert_calib": 5.6124443438633635, "uJ_calib": 605.4608924473305, "threshold": 0, "queue_length": 5000, @@ -63,9 +69,9 @@ 0.3 ], "calib_x_norm": [ - 0.062669573236063, - -0.00022005607047881966, - -0.06345007115420614 + 0.053477701499551306, + 0.002010027303857127, + -0.0624083721767513 ], "calib_y_range": [ -0.3, @@ -73,19 +79,19 @@ 0.3 ], "calib_y_norm": [ - -0.06458958089191447, - 0.0013075448092699194, - 0.06446136126470543 + -0.05708126055992021, + -0.0014145962948527093, + 0.049824031188057456 ], - "calib_datetime": "2023-10-09 17:35:46", + "calib_datetime": "2023-11-27 18:32:01", "calib_x_norm_std": [ - 0.04538184772694033, - 0.04741190286825635, - 0.04190871255021984 + 0.8405729474786395, + 0.7912252362742299, + 0.8749748472341693 ], "calib_y_norm_std": [ - 0.059742138998617196, - 0.05503841499919202, - 0.061553251337725524 + 0.829282029537981, + 0.8273938236773883, + 0.8256896298568531 ] } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP11-PBPS122_proc.json b/configuration/pipeline_config/SAROP11-PBPS122_proc.json index 45a5f29..5be11bd 100644 --- a/configuration/pipeline_config/SAROP11-PBPS122_proc.json +++ b/configuration/pipeline_config/SAROP11-PBPS122_proc.json @@ -10,11 +10,14 @@ ], "mode": "PUSH", "allow_type_changes": false, - "processing_threads": 1, + "processing_threads": 0, "abort_on_timeout": true, "abort_on_error": true, "debug": true, "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "stream_timeout": 20, "function": "pbps_full.py", "reload": true, @@ -24,12 +27,12 @@ "down": "SAROP11-PBPS122:Lnk9Ch0-PP_VAL_PD2", "right": "SAROP11-PBPS122:Lnk9Ch0-PP_VAL_PD3", "left": "SAROP11-PBPS122:Lnk9Ch0-PP_VAL_PD0", - "up_calib": 3.6725798139735494e-05, - "down_calib": 5.171124934792115e-05, - "left_calib": 1.906778368285852e-05, - "right_calib": 2.0158234074188752e-05, - "horiz_calib": -5.23620874566979, - "vert_calib": -4.423935429496435, + "up_calib": 8.260394053837945e-05, + "down_calib": 0.0001053082076374567, + "left_calib": 8.850560063440816e-05, + "right_calib": 0.00010465952581699319, + "horiz_calib": -5.671978410741236, + "vert_calib": -5.633880294004439, "uJ_calib": 605.9512700123181, "threshold": 0, "queue_length": 1000, @@ -67,14 +70,14 @@ 0.3 ], "calib_x_norm": [ - 0.05805726009863969, - 0.0003241127869780219, - -0.0565294626893287 + 0.05093945114235838, + -0.0017631144492631953, + -0.05484374416454858 ], "calib_x_norm_std": [ - 0.4041536224283613, - 0.40359430716500855, - 0.4052643606590091 + 0.6318974367582005, + 0.6355268212490287, + 0.6720457022563601 ], "calib_y_range": [ -0.3, @@ -82,14 +85,14 @@ 0.3 ], "calib_y_norm": [ - 0.06701636535402986, - 9.436298752542843e-05, - -0.06860948397449354 + 0.053566888769106424, + 0.00025161571193160266, + -0.05293164664324844 ], "calib_y_norm_std": [ - 0.3972258108953916, - 0.4101000051454593, - 0.40583173827760693 + 0.6701382766699944, + 0.6807018300686237, + 0.6593694552297956 ], - "calib_datetime": "2023-09-14 15:26:26" + "calib_datetime": "2023-11-28 17:45:39" } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP11-PPRM122_proc.json b/configuration/pipeline_config/SAROP11-PPRM122_proc.json new file mode 100644 index 0000000..cd9a230 --- /dev/null +++ b/configuration/pipeline_config/SAROP11-PPRM122_proc.json @@ -0,0 +1,19 @@ +{ + "image_background_enable": false, + "image_background": null, + "image_threshold": null, + "image_region_of_interest": null, + "image_good_region": { + "threshold": 0.5, + "gfscale": 3.0 + }, + "image_slices": null, + "pipeline_type": "processing", + "camera_name": "SAROP11-PPRM122", + "name": "SAROP11-PPRM122_proc", + "function": "pprm_simple.py", + "mode": "PUSH", + "allow_type_changes": false, + "no_client_timeout": 0, + "port": "9012" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP21-ATT01_proc.json b/configuration/pipeline_config/SAROP21-ATT01_proc.json index 6420de5..3d49770 100644 --- a/configuration/pipeline_config/SAROP21-ATT01_proc.json +++ b/configuration/pipeline_config/SAROP21-ATT01_proc.json @@ -14,14 +14,17 @@ "function": "SAROP21-ATT01_Debug_proc.py", "device": "SAROP21-ATT01", "mode": "PUSH", - "allow_type_changes": false, "name": "SAROP21-ATT01_proc", "no_client_timeout": 0, "processing_threads": 1, + "allow_type_changes": false, "abort_on_timeout": true, "abort_on_error": false, "debug": true, "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "stream_timeout": 20, "pipeline_type": "stream", "reload": true, @@ -37,8 +40,5 @@ "fel_on_event": 13, "use_dark": true, "filter_window": 201, - "filter": true, - "enforce_pid": true, - "enforce_timestamp": true, - "check_timestamp": true + "filter": true } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP21-PBPS103_proc.json b/configuration/pipeline_config/SAROP21-PBPS103_proc.json index 071754f..3488bfe 100644 --- a/configuration/pipeline_config/SAROP21-PBPS103_proc.json +++ b/configuration/pipeline_config/SAROP21-PBPS103_proc.json @@ -1,61 +1,67 @@ { - "down_calib": 0.6776148346242159, + "mode": "PUSH", + "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, + "queue_length": 5000, + "down_calib": 2.345095029254029e-06, "xpos_odd_w_pvname": "SAROP21-PBPS103:XPOS-ODD-HIST-W", "ypos_all_y_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-Y", "ypos_all_w_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-W", "name": "SAROP21-PBPS103_proc", - "vert_calib": -4.1515389887188725, + "vert_calib": -4.107388665528667, "bsread_address": "", - "right": "SAROP21-CVME-PBPS1:Lnk9Ch2-DATA-SUM", + "right": "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD3", "ypos_dif_w_pvname": "SAROP21-PBPS103:YPOS-DIF-HIST-W", "ypos_odd_x_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-X", - "function": "pbps.py", + "function": "pbps_fft", "port": "9009", - "left_calib": 0.42478367611829265, - "down": "SAROP21-CVME-PBPS1:Lnk9Ch3-DATA-SUM", + "left_calib": 1.8604645624663628e-06, + "down": "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD2", "ypos_odd_w_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-W", "xpos_odd_y_pvname": "SAROP21-PBPS103:XPOS-ODD-HIST-Y", - "mode": "PUB", - "allow_type_changes": false, - "queue_length": 5000, "xpos_evn_w_pvname": "SAROP21-PBPS103:XPOS-EVN-HIST-W", "ypos_odd_y_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-Y", "no_client_timeout": 0, "ypos_evn_x_pvname": "SAROP21-PBPS103:YPOS-EVN-HIST-X", "uJ_calib": 605.9512700123181, "xpos_evn_m_pvname": "SAROP21-PBPS103:XPOS-EVN-HIST-M", - "horiz_calib": 5.3109820165021535, + "horiz_calib": -3.7979163733652124, "ypos_all_m_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-M", "ypos_dif_m_pvname": "SAROP21-PBPS103:YPOS-DIF-HIST-M", "bsread_channels": [ - "SAROP21-CVME-PBPS1:Lnk9Ch1-DATA-SUM", - "SAROP21-CVME-PBPS1:Lnk9Ch2-DATA-SUM", - "SAROP21-CVME-PBPS1:Lnk9Ch3-DATA-SUM", - "SAROP21-CVME-PBPS1:Lnk9Ch4-DATA-SUM" + "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD0", + "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD1", + "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD2", + "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD3" ], "xpos_dif_m_pvname": "SAROP21-PBPS103:XPOS-DIF-HIST-M", "ypos_evn_w_pvname": "SAROP21-PBPS103:YPOS-EVN-HIST-W", "pipeline_type": "stream", - "stream_timeout": 20, "ypos_all_x_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-X", - "right_calib": 0.3858345895568209, + "right_calib": 1.938280827709179e-06, "xpos_all_m_pvname": "SAROP21-PBPS103:XPOS-ALL-HIST-M", "xpos_odd_m_pvname": "SAROP21-PBPS103:XPOS-ODD-HIST-M", - "left": "SAROP21-CVME-PBPS1:Lnk9Ch1-DATA-SUM", + "left": "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD0", "xpos_evn_y_pvname": "SAROP21-PBPS103:XPOS-EVN-HIST-Y", "reload": true, "xpos_all_y_pvname": "SAROP21-PBPS103:XPOS-ALL-HIST-Y", - "abort_on_timeout": true, "xpos_all_w_pvname": "SAROP21-PBPS103:XPOS-ALL-HIST-W", "xpos_dif_w_pvname": "SAROP21-PBPS103:XPOS-DIF-HIST-W", "ypos_evn_m_pvname": "SAROP21-PBPS103:YPOS-EVN-HIST-M", "ypos_evn_y_pvname": "SAROP21-PBPS103:YPOS-EVN-HIST-Y", "xpos_odd_x_pvname": "SAROP21-PBPS103:XPOS-ODD-HIST-X", "threshold": 0, - "up_calib": 0.6238403279438393, + "up_calib": 2.237138787544513e-06, "ypos_odd_m_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-M", "xpos_all_x_pvname": "SAROP21-PBPS103:XPOS-ALL-HIST-X", - "up": "SAROP21-CVME-PBPS1:Lnk9Ch4-DATA-SUM", + "up": "SAROP21-PBPS103:Lnk9Ch0-PP_VAL_PD1", "xpos_evn_x_pvname": "SAROP21-PBPS103:XPOS-EVN-HIST-X", "calib_x_range": [ -0.3, @@ -63,9 +69,9 @@ 0.3 ], "calib_x_norm": [ - -0.057015299750002656, - 0.0011554150937345086, - 0.05595815753825302 + 0.07954047295712068, + -0.004129649086041158, + -0.07844088866732161 ], "calib_y_range": [ -0.3, @@ -73,19 +79,19 @@ 0.3 ], "calib_y_norm": [ - 0.07377056469911934, - -0.0007700758942303132, - -0.07075415291292807 + 0.07343998285666285, + 0.0008404504608791769, + -0.072638231030304 ], "calib_x_norm_std": [ - 0.3912513863330545, - 0.33979404347367814, - 0.35849025842147947 + 0.02615166241705118, + 0.03146081595118508, + 0.026519528573341077 ], "calib_y_norm_std": [ - 0.39103341690150445, - 0.37747061460501213, - 0.39400898893958414 + 0.03475168509244215, + 0.0329588972422198, + 0.032931411355669175 ], - "calib_datetime": "2023-10-03 07:48:00" + "calib_datetime": "2023-12-16 22:17:50" } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP21-PBPS133_proc.json b/configuration/pipeline_config/SAROP21-PBPS133_proc.json index fc73e0b..419a2b0 100644 --- a/configuration/pipeline_config/SAROP21-PBPS133_proc.json +++ b/configuration/pipeline_config/SAROP21-PBPS133_proc.json @@ -10,12 +10,15 @@ ], "mode": "PUSH", "allow_type_changes": false, - "processing_threads": 1, "abort_on_timeout": true, "abort_on_error": false, "debug": true, "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "stream_timeout": 20, + "processing_threads": 1, "function": "pbps_full.py", "reload": true, "no_client_timeout": 0, @@ -24,12 +27,12 @@ "down": "SAROP21-PBPS133:Lnk9Ch0-PP_VAL_PD2", "right": "SAROP21-PBPS133:Lnk9Ch0-PP_VAL_PD3", "left": "SAROP21-PBPS133:Lnk9Ch0-PP_VAL_PD0", - "up_calib": 1.5389517301018466e-05, - "down_calib": 1.467647070564706e-05, - "left_calib": 9.792731740491983e-06, - "right_calib": 9.140366116267942e-06, - "horiz_calib": -4.403049705481173, - "vert_calib": -4.143007729427544, + "up_calib": 2.302287768621037e-06, + "down_calib": 2.1486832052818416e-06, + "left_calib": 1.980886505345383e-06, + "right_calib": 1.7496940589950085e-06, + "horiz_calib": -3.6194086573180084, + "vert_calib": -4.05561350847352, "uJ_calib": 605.4608924473305, "threshold": 0, "queue_length": 3000, @@ -67,14 +70,14 @@ 0.3 ], "calib_x_norm": [ - 0.06888455615546296, - -0.0010306772860041692, - -0.06738463000727442 + 0.08387188111710729, + 0.002629121476999102, + -0.08190105496372796 ], "calib_x_norm_std": [ - 0.42942925280271577, - 0.39658630285672014, - 0.39668245256653745 + 0.030074237123352995, + 0.03202154895295221, + 0.03065461541856456 ], "calib_y_range": [ -0.3, @@ -82,14 +85,14 @@ 0.3 ], "calib_y_norm": [ - 0.07364761176357257, - 0.0006085135080750125, - -0.07117471037168067 + 0.07343671569103251, + -0.0007935082666288781, + -0.07450637571706177 ], "calib_y_norm_std": [ - 0.4026880422356293, - 0.40240959119693887, - 0.39778796220601226 + 0.03632897978156685, + 0.036921705511352064, + 0.03616553762276342 ], - "calib_datetime": "2023-10-03 07:45:28" + "calib_datetime": "2023-12-16 22:11:42" } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP21-PBPS138_proc.json b/configuration/pipeline_config/SAROP21-PBPS138_proc.json index 429325b..d1688a1 100644 --- a/configuration/pipeline_config/SAROP21-PBPS138_proc.json +++ b/configuration/pipeline_config/SAROP21-PBPS138_proc.json @@ -1,7 +1,5 @@ { "pipeline_type": "stream", - "abort_on_timeout": true, - "stream_timeout": 20, "name": "SAROP21-PBPS138_proc", "bsread_address": "", "bsread_channels": [ @@ -12,6 +10,14 @@ ], "mode": "PUB", "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, "function": "pbps.py", "no_client_timeout": 0, "port": "9009", diff --git a/configuration/pipeline_config/SAROP31-PBPS113_proc.json b/configuration/pipeline_config/SAROP31-PBPS113_proc.json index 64e65ce..43bad90 100644 --- a/configuration/pipeline_config/SAROP31-PBPS113_proc.json +++ b/configuration/pipeline_config/SAROP31-PBPS113_proc.json @@ -9,29 +9,32 @@ "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD3" ], "mode": "PUSH", - "allow_type_changes": false, "function": "pbps_full.py", "reload": true, - "no_client_timeout": 0, - "processing_threads": 1, + "allow_type_changes": false, "abort_on_timeout": true, "abort_on_error": false, "debug": true, "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "stream_timeout": 20, + "no_client_timeout": 0, + "processing_threads": 1, "up": "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD1", "down": "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD2", "right": "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD3", "left": "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD0", - "up_calib": 3.4874916230451215e-05, - "down_calib": 2.8938407262475286e-05, - "left_calib": 6.668412901725199e-05, - "right_calib": 8.901396735964635e-05, - "horiz_calib": -3.852522089625701, - "vert_calib": -6.2976405058048845, + "up_calib": 1.3175436096394441e-05, + "down_calib": 1.5036546627308606e-05, + "left_calib": 3.1887584275696484e-05, + "right_calib": 3.722003831579624e-05, + "horiz_calib": -3.9446335571333027, + "vert_calib": -7.009396901398793, "uJ_calib": 941.943984588351, "threshold": 0, - "queue_length": 5000, + "queue_length": 300, "xpos_all_x_pvname": "SAROP31-PBPS113:XPOS-ALL-HIST-X", "xpos_all_y_pvname": "SAROP31-PBPS113:XPOS-ALL-HIST-Y", "xpos_all_m_pvname": "SAROP31-PBPS113:XPOS-ALL-HIST-M", @@ -67,14 +70,14 @@ 0.3 ], "calib_x_norm": [ - 0.07749233353786725, - 0.001282049484060931, - -0.07824979747176808 + 0.07635186735124318, + 0.0006787788287971773, + -0.07575351615516294 ], "calib_x_norm_std": [ - 0.166014369496804, - 0.1519798416480267, - 0.1487731725522344 + 0.11111011715402397, + 0.10803039641898522, + 0.10654207734466892 ], "calib_y_range": [ -0.3, @@ -82,14 +85,14 @@ 0.3 ], "calib_y_norm": [ - 0.0479777250366171, - 0.0008593204304962432, - -0.04729605241176959 + 0.04025605145908799, + -0.00028632736218344964, + -0.045343324413073594 ], "calib_y_norm_std": [ - 0.15729264570026444, - 0.15889926981179298, - 0.16700609913611925 + 0.11130579296839123, + 0.11052246554408188, + 0.11072063526778356 ], - "calib_datetime": "2023-10-20 16:31:53" + "calib_datetime": "2023-12-05 07:36:57" } \ No newline at end of file diff --git a/configuration/pipeline_config/SAROP31-PBPS149_proc.json b/configuration/pipeline_config/SAROP31-PBPS149_proc.json index 039ea9a..8c564f9 100644 --- a/configuration/pipeline_config/SAROP31-PBPS149_proc.json +++ b/configuration/pipeline_config/SAROP31-PBPS149_proc.json @@ -10,13 +10,16 @@ "SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD4" ], "mode": "PUSH", - "allow_type_changes": false, "function": "pbps_full.py", "processing_threads": 1, + "allow_type_changes": false, "abort_on_timeout": true, "abort_on_error": false, "debug": true, "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, "stream_timeout": 20, "reload": true, "no_client_timeout": 0, @@ -24,12 +27,12 @@ "down": "SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD2", "right": "SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD3", "left": "SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD0", - "up_calib": 0.00017938789978387348, - "down_calib": 0.0001782086466835371, - "left_calib": 0.00036578906554062164, - "right_calib": 0.0006012187907325731, - "horiz_calib": -4.003372933872114, - "vert_calib": -7.45031213379614, + "up_calib": 2.678422297844202e-06, + "down_calib": 2.8868108931245563e-06, + "left_calib": 1.2257899137298865e-06, + "right_calib": 1.625684652214226e-06, + "horiz_calib": -4.687153839895848, + "vert_calib": -4.1873578609887785, "uJ_calib": 605.9512700123181, "threshold": 0.0, "queue_length": 5000, @@ -68,14 +71,14 @@ 0.3 ], "calib_x_norm": [ - 0.07460135276638057, - -0.0008530463297491542, - -0.07527226877995695 + 0.062454691694592605, + -0.0003840643297906375, + -0.06555476148207813 ], "calib_x_norm_std": [ - 0.05047012731044763, - 0.04996428162150149, - 0.04948594514673093 + 0.07522085671893264, + 0.07570700091708837, + 0.08055394853540152 ], "calib_y_range": [ -0.3, @@ -83,14 +86,14 @@ 0.3 ], "calib_y_norm": [ - 0.04086528216715967, - 0.00010506363434726255, - -0.039668256458460754 + 0.07371047250036487, + -0.00016826510539756225, + -0.06957797332124913 ], "calib_y_norm_std": [ - 0.04575941761073842, - 0.0455948853624268, - 0.04522573724833574 + 0.07631255238942859, + 0.08439391910804894, + 0.09070396825848576 ], - "calib_datetime": "2023-09-27 08:53:51" + "calib_datetime": "2023-12-05 07:40:19" } \ No newline at end of file diff --git a/configuration/pipeline_config/SATBD01-DSCR050_sp.json b/configuration/pipeline_config/SATBD01-DSCR050_sp.json index 35f6176..933b85b 100644 --- a/configuration/pipeline_config/SATBD01-DSCR050_sp.json +++ b/configuration/pipeline_config/SATBD01-DSCR050_sp.json @@ -6,5 +6,6 @@ "image_good_region": null, "image_slices": null, "camera_name": "SATBD01-DSCR050", - "name": "SATBD01-DSCR050_sp" + "name": "SATBD01-DSCR050_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SATBD01-DSCR110_sp.json b/configuration/pipeline_config/SATBD01-DSCR110_sp.json index ff611ed..89bccdb 100644 --- a/configuration/pipeline_config/SATBD01-DSCR110_sp.json +++ b/configuration/pipeline_config/SATBD01-DSCR110_sp.json @@ -6,5 +6,6 @@ "image_good_region": null, "image_slices": null, "camera_name": "SATBD01-DSCR110", - "name": "SATBD01-DSCR110_sp" + "name": "SATBD01-DSCR110_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SATBD01-DSCR120_sp.json b/configuration/pipeline_config/SATBD01-DSCR120_sp.json index 673e57e..0d8a049 100644 --- a/configuration/pipeline_config/SATBD01-DSCR120_sp.json +++ b/configuration/pipeline_config/SATBD01-DSCR120_sp.json @@ -7,5 +7,6 @@ "image_slices": null, "pipeline_type": "processing", "camera_name": "SATBD01-DSCR120", - "name": "SATBD01-DSCR120_sp" + "name": "SATBD01-DSCR120_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SATBD01-DSCR210_sp.json b/configuration/pipeline_config/SATBD01-DSCR210_sp.json index 538cd05..690e48f 100644 --- a/configuration/pipeline_config/SATBD01-DSCR210_sp.json +++ b/configuration/pipeline_config/SATBD01-DSCR210_sp.json @@ -7,5 +7,6 @@ "image_slices": null, "pipeline_type": "processing", "camera_name": "SATBD01-DSCR210", - "name": "SATBD01-DSCR210_sp" + "name": "SATBD01-DSCR210_sp", + "max_frame_rate": 10.1 } \ No newline at end of file diff --git a/configuration/pipeline_config/SATBD02-DSCR050_sp.json b/configuration/pipeline_config/SATBD02-DSCR050_sp.json index 17bd422..4847c97 100644 --- a/configuration/pipeline_config/SATBD02-DSCR050_sp.json +++ b/configuration/pipeline_config/SATBD02-DSCR050_sp.json @@ -2,12 +2,7 @@ "image_background_enable": false, "image_background": "SATBD02-DSCR050_20230923_150234_114901", "image_threshold": null, - "image_region_of_interest": [ - 64, - 1846, - 111, - 1858 - ], + "image_region_of_interest": null, "image_good_region": null, "image_slices": null, "pipeline_type": "processing", @@ -17,10 +12,10 @@ "no_client_timeout": 0, "port": "9020", "Marker": [ - 707, - 1295 + 1020, + 1004 ], "reload": true, - "function": "beam_full_width.py", - "fw_threshold": 0.1 + "function": "beam_full_width", + "fw_threshold": 0.2 } \ No newline at end of file diff --git a/configuration/pipeline_config/SATES21-CAMS-PATT1_spec_db.json b/configuration/pipeline_config/SATES21-CAMS-PATT1_spec_db.json index 77f355a..ec4672f 100644 --- a/configuration/pipeline_config/SATES21-CAMS-PATT1_spec_db.json +++ b/configuration/pipeline_config/SATES21-CAMS-PATT1_spec_db.json @@ -1,6 +1,6 @@ { "image_background_enable": "passive", - "image_background": "SATES21-CAMS-PATT1_20231006_125947_646571", + "image_background": "SATES21-CAMS-PATT1_20231215_164756_291454", "image_threshold": null, "image_region_of_interest": null, "image_good_region": null, @@ -20,10 +20,16 @@ "threshold": 12, "project_axis": 0, "reload": true, + "roi_background": [ + 1, + 100, + 4, + 2506 + ], "roi_signal": [ - 395, - 922, - 25, - 2224 + 100, + 848, + 4, + 2506 ] } \ No newline at end of file diff --git a/configuration/pipeline_config/SATES21-CAMS154-GIGE11_sp.json b/configuration/pipeline_config/SATES21-CAMS154-GIGE11_sp.json new file mode 100644 index 0000000..8a5947f --- /dev/null +++ b/configuration/pipeline_config/SATES21-CAMS154-GIGE11_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": "SATES21-CAMS154-GIGE11", + "name": "SATES21-CAMS154-GIGE11_sp" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SATES21-CAMS154-M1_spec_db.json b/configuration/pipeline_config/SATES21-CAMS154-M1_spec_db.json index 4630bce..7bd515c 100644 --- a/configuration/pipeline_config/SATES21-CAMS154-M1_spec_db.json +++ b/configuration/pipeline_config/SATES21-CAMS154-M1_spec_db.json @@ -1,6 +1,6 @@ { "image_background_enable": "passive", - "image_background": "SATES21-CAMS154-M1_20231004_091251_164195", + "image_background": "SATES21-CAMS154-M1_20231213_092922_535843", "image_threshold": null, "image_region_of_interest": null, "image_good_region": null, @@ -16,16 +16,16 @@ "project_axis": 0, "threshold": 5, "roi_background": [ - 310, - 540, - 189, - 1310 + 21, + 602, + 7, + 1401 ], "roi_signal": [ - 310, - 540, - 189, - 1310 + 21, + 602, + 7, + 1401 ], "reload": true } \ No newline at end of file diff --git a/configuration/pipeline_config/SATES31-CAMS187-RIXS1_proc.json b/configuration/pipeline_config/SATES31-CAMS187-RIXS1_proc.json index 05b3495..3ef8cfa 100644 --- a/configuration/pipeline_config/SATES31-CAMS187-RIXS1_proc.json +++ b/configuration/pipeline_config/SATES31-CAMS187-RIXS1_proc.json @@ -8,8 +8,8 @@ "pipeline_type": "processing", "camera_name": "SATES31-CAMS187-RIXS1", "name": "SATES31-CAMS187-RIXS1_proc", - "function": "Furka_tt.py", - "mode": "PUB", + "function": "profiles.py", + "mode": "PUSH", "allow_type_changes": false, "multiprocessing": false, "processing_threads": 3, diff --git a/configuration/pipeline_config/SATES31-CAMS187-RIXS1_sp.json b/configuration/pipeline_config/SATES31-CAMS187-RIXS1_sp.json index cf7ffd6..f8ee493 100644 --- a/configuration/pipeline_config/SATES31-CAMS187-RIXS1_sp.json +++ b/configuration/pipeline_config/SATES31-CAMS187-RIXS1_sp.json @@ -1,8 +1,13 @@ { "image_background_enable": false, - "image_background": "SATES31-CAMS187-RIXS1_20230914_081452_382733", + "image_background": "SATES31-CAMS187-RIXS1_20231024_235607_038268", "image_threshold": null, - "image_region_of_interest": null, + "image_region_of_interest": [ + 17, + 2413, + 923, + 276 + ], "image_good_region": null, "image_slices": null, "pipeline_type": "processing", diff --git a/configuration/pipeline_config/SATOP31-PMOS132-2D_pmos.json b/configuration/pipeline_config/SATOP31-PMOS132-2D_pmos.json index cf80ef6..449c0f6 100644 --- a/configuration/pipeline_config/SATOP31-PMOS132-2D_pmos.json +++ b/configuration/pipeline_config/SATOP31-PMOS132-2D_pmos.json @@ -1,6 +1,6 @@ { "image_background_enable": true, - "image_background": "SATOP31-PMOS132-2D_20220607_121502_104208", + "image_background": "SATOP31-PMOS132-2D_20231107_172337_721116", "image_threshold": null, "image_region_of_interest": null, "image_good_region": null, diff --git a/configuration/pipeline_config/SINDI01-DSCR075_sp.json b/configuration/pipeline_config/SINDI01-DSCR075_sp.json new file mode 100644 index 0000000..b61e438 --- /dev/null +++ b/configuration/pipeline_config/SINDI01-DSCR075_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": "SINDI01-DSCR075", + "name": "SINDI01-DSCR075_sp" +} \ No newline at end of file diff --git a/configuration/pipeline_config/SLAAR21-LCAM-CS841_proc.json b/configuration/pipeline_config/SLAAR21-LCAM-CS841_proc.json index a0604d6..0f269c2 100644 --- a/configuration/pipeline_config/SLAAR21-LCAM-CS841_proc.json +++ b/configuration/pipeline_config/SLAAR21-LCAM-CS841_proc.json @@ -13,5 +13,6 @@ "allow_type_changes": false, "_debug": true, "_processing_threads": 2, - "no_client_timeout": 0 + "no_client_timeout": 0, + "reload": true } \ No newline at end of file diff --git a/configuration/pipeline_config/permanent_instances.json b/configuration/pipeline_config/permanent_instances.json index 8697823..95cb4b5 100644 --- a/configuration/pipeline_config/permanent_instances.json +++ b/configuration/pipeline_config/permanent_instances.json @@ -2,11 +2,15 @@ "#S10BC02-DSRM310_profiles": "S10BC02-DSRM310_profiles", "#SARES11-SPEC125-M1_psen_db": "SARES11-SPEC125-M1_psen_db", "#SARES11-SPEC125-M1_test": "SARES11-SPEC125-M1_test", + "#SARES11-SPEC125-M2_db": "SARES11-SPEC125-M2_db", "#SARES11-SPEC125-M2_pp_db": "SARES11-SPEC125-M2_pp_db", "#SARES11-SPEC125-M2_psen_db": "SARES11-SPEC125-M2_psen_db", + "#SARES11-SPEC125-M3_sp": "SARES11-SPEC125-M3_sp", "#SARES11-XMI125-C4P1_db": "SARES11-XMI125-C4P1_db", "#SARES12-CAMS128-M1_psen_db": "SARES12-CAMS128-M1_psen_db", "#SARES20-CAMS142-M1_psen_db": "SARES20-CAMS142-M1_psen_db", + "#SARFE10-PSSS059_psss_avg": "SARFE10-PSSS059_psss_avg", + "#SARFE10-PSSS059_store": "SARFE10-PSSS059_store", "#SAROP11-ATT01_proc": "SAROP11-ATT01_proc", "#SAROP21-PPRM102_proc": "SAROP21-PPRM102_proc", "#SATBD02-DSCR050_db": "SATBD02-DSCR050_db", @@ -34,21 +38,24 @@ "S10BD01-DSCR030_profiles": "S10BD01-DSCR030_profiles", "SARBD01-DSCR110_sp1": "SARBD01-DSCR110_sp_rep", "SARCL01-DSCR170_profiles": "SARCL01-DSCR170_profiles", - "SARES11-SPEC125-M2_db": "SARES11-SPEC125-M2_db", + "SARES11-SPEC125-M3_spec_db": "SARES11-SPEC125-M3_spec_db", "SARES20-CAMS142-M3_proc": "SARES20-CAMS142-M3_proc", + "SARES20-CAMS142-M4_psen_db": "SARES20-CAMS142-M4_psen_db", "SARES20-CAMS142-M5_psen_db": "SARES20-CAMS142-M5_psen_db", "SARES20-CAMS142-M5_psen_db_proxy": "SARES20-CAMS142-M5_psen_db_proxy", "SARES20-DSDPPRM_proc": "SARES20-DSDPPRM_proc", "SARES20-PROF141-M1_proc": "SARES20-PROF141-M1_proc", "SARES20-PROF142-M1_proc": "SARES20-PROF142-M1_proc", + "SARES30-CAMS156-SMX-OAV_db": "SARES30-CAMS156-SMX-OAV_db", "SARES30-CAMS156-XE_proc": "SARES30-CAMS156-XE_proc", "SARFE10-PBPS053_proc": "SARFE10-PBPS053_proc", "SARFE10-PPRM064_proc": "SARFE10-PPRM064_proc", + "SARFE10-PSSS059-LB_psss": "SARFE10-PSSS059-LB_psss", "SARFE10-PSSS059_psss": "SARFE10-PSSS059_psss", - "SARFE10-PSSS059_psss_avg": "SARFE10-PSSS059_psss_avg", - "SARFE10-PSSS059_store": "SARFE10-PSSS059_store", + "SARFE10-PSSS059_sp_br": "SARFE10-PSSS059_sp_br", "SAROP11-PBPS110_proc": "SAROP11-PBPS110_proc", "SAROP11-PBPS122_proc": "SAROP11-PBPS122_proc", + "SAROP11-PPRM122_proc": "SAROP11-PPRM122_proc", "SAROP21-ATT01_proc": "SAROP21-ATT01_proc", "SAROP21-PBPS103_proc": "SAROP21-PBPS103_proc", "SAROP21-PBPS133_proc": "SAROP21-PBPS133_proc", @@ -87,5 +94,6 @@ "simulation_3_sp": "simulation_3_sp", "simulation_sp": "simulation_sp", "test_furka": "test_furka", + "test_furka_proc": "test_furka_proc", "test_tadej": "test_tadej" } \ No newline at end of file diff --git a/configuration/pipeline_config/servers.json b/configuration/pipeline_config/servers.json index 59e5ec6..6f5197f 100644 --- a/configuration/pipeline_config/servers.json +++ b/configuration/pipeline_config/servers.json @@ -35,6 +35,7 @@ "SAROP21-PBPS103_proc:9009", "SAROP11-PBPS110_proc:9007", "SAROP31-PBPS113_proc:9013", + "SARFE10-PSSS059_sp_br:9005", "SAROP31-PBPS149_proc:9011", "SAROP11-PBPS122_proc:9010", "SAROP11-ATT01_proc:9016", @@ -71,19 +72,22 @@ "cameras": [], "enabled": true, "expanding": true, - "instances": [ - "SARBD01-DSCR110_sp", - "SARBD01-DSCR110_sp_rep" - ] + "instances": [] }, "http://sf-daqsync-10.psi.ch:8881": { "cameras": [ "SINDI02-DSCR075", "SINBC02-DSRM310", "S10BD01-DSCR030", - "SATBD02-DSCR050", + "SARBD01-DSCR110", + "SARBD01-DSCR059", + "SATBD01-DSCR050", + "SATBD01-DSCR110", "SATBD01-DSCR120", - "SLG-LCAM-C103" + "SATBD01-DSCR210", + "SATBD02-DSCR050", + "SLG-LCAM-C103", + "SARBD02-DSCR050" ], "enabled": true, "expanding": false, @@ -100,6 +104,8 @@ "SARCL01-DSCR170_sp", "SATBD02-DSCR050_sp_rep", "SATBD01-DSCR120_sp", + "SARBD01-DSCR110_sp", + "SARBD01-DSCR110_sp_rep", "SARCL01-DSCR170_profiles:9005", "SLG-LCAM-C103_proc:9006", "test_merge_disp_sp:9007" @@ -118,9 +124,10 @@ "SARFE10-PSSS059_sp", "SARFE10-PSSS059_psss_avg:9005", "SARES20-CAMS142-M3_sp", - "SARES20-CAMS142-M3_spec:9004", + "SARES20-CAMS142-M3_spec", "SARES20-CAMS142-M3_proc:9006", - "SARFE10-PSSS059_store:8890" + "SARFE10-PSSS059_store:8890", + "SARFE10-PSSS059-LB_psss:9004" ] }, "http://sf-daqsync-12.psi.ch:8881": { @@ -161,6 +168,7 @@ "SARES11-SPEC125-M1", "SARES12-CAMS128-M1", "SARES11-SPEC125-M2", + "SARES11-SPEC125-M3", "Alvra_spatial_encoding", "Alvra_spectral_encoding", "SARES12-XPR128-C4F1", @@ -173,9 +181,12 @@ "#SARES11-SPEC125-M1_test:9009", "#SARES11-SPEC125-M2_psen_db:9011", "#SARES12-CAMS128-M1_psen_db:9003", - "SARES11-XMI125-C4P1_db:9011", + "#SARES11-XMI125-C4P1_db:9011", "#SARES11-SPEC125-M2_pp_db", - "SARES11-SPEC125-M2_db:9011" + "#SARES11-SPEC125-M2_db:9011", + "#SARES11-SPEC125-M3_sp", + "SARES11-SPEC125-M3_spec_db", + "SAROP11-PPRM122_proc:9012" ] }, "http://sf-daqsync-14.psi.ch:8881": { @@ -210,6 +221,7 @@ "SARES20-CAMS142-M5_psen_db_proxy:9011", "SARES20-PROF142-M1_sp", "SARES20-PROF142-M1_proc:9016", + "SARES20-PROF142-M1_ib:9036", "SAROP21-PPRM113_proc:9007", "SAROP21-PPRM138_proc:9015", "SAROP21-PPRM138_sp", @@ -252,7 +264,8 @@ "SATES30-CAMS182-GIGE1_sp", "SATES30-CAMS182-GIGE2_sp", "SATES30-CAMS182-GIGE1_profiles:9002", - "SATES30-CAMS182-GIGE2_profiles:9004" + "SATES30-CAMS182-GIGE2_profiles:9004", + "test_furka_proc:9020" ] }, "http://sf-daqsync-16.psi.ch:8881": { @@ -269,6 +282,7 @@ "SARES30-CAMS156-PCO1_sp", "SAROP31-PPRM113_sp", "SAROP31-PPRM150_sp", + "SARES30-CAMS156-SMX-OAV_db:9009", "SAROP31-PPRM113_proc:9001", "SAROP31-PPRM150_proc:9003", "SARES30-CAMS156-XE_proc:9007" @@ -290,7 +304,8 @@ "enabled": true, "expanding": false, "instances": [ - "test_tadej:9000" + "test_tadej:9000", + "DET-FURKA-1_sp" ] } } \ No newline at end of file diff --git a/configuration/pipeline_config/simulation_2_sp.json b/configuration/pipeline_config/simulation_2_sp.json index 454f7b8..e4fdc9c 100644 --- a/configuration/pipeline_config/simulation_2_sp.json +++ b/configuration/pipeline_config/simulation_2_sp.json @@ -8,6 +8,7 @@ "pipeline_type": "processing", "camera_name": "simulation_2", "name": "simulation_2_sp", - "function": "test_epics", - "processing_threads": 4 -} + "function": "bunch_length_op", + "replace": false, + "fw_level": 0.5 +} \ No newline at end of file diff --git a/configuration/pipeline_config/simulation_3_sp.json b/configuration/pipeline_config/simulation_3_sp.json index b4e35c1..f3190f4 100644 --- a/configuration/pipeline_config/simulation_3_sp.json +++ b/configuration/pipeline_config/simulation_3_sp.json @@ -1,7 +1,7 @@ { "image_background_enable": false, - "image_background": null, - "image_threshold": 1000.0, + "image_background": "simulation_3_20231116_164332_768850", + "image_threshold": 100.0, "image_region_of_interest": null, "image_good_region": null, "image_slices": { @@ -11,5 +11,8 @@ }, "pipeline_type": "processing", "camera_name": "simulation_3", - "name": "simulation_3_sp" + "name": "simulation_3_sp", + "_processing_threads": 2, + "_multiprocessing": true, + "reload": true } \ No newline at end of file diff --git a/configuration/pipeline_config/simulation_sp.json b/configuration/pipeline_config/simulation_sp.json index 5811ce8..306f68a 100644 --- a/configuration/pipeline_config/simulation_sp.json +++ b/configuration/pipeline_config/simulation_sp.json @@ -1,25 +1,22 @@ { "image_background_enable": false, - "image_background": null, - "image_threshold": 20.0, - "image_region_of_interest": [ - 457, - 342, - 426, - 99 - ], + "image_background": "simulation_20231031_092133_801186", + "image_threshold": 500.0, + "image_region_of_interest": null, "image_good_region": { - "threshold": 0.1, - "gfscale": 3.0 + "threshold": 0.05, + "gfscale": 5.0 }, "image_slices": null, "pipeline_type": "processing", "camera_name": "simulation", "name": "simulation_sp", "reload": true, - "function": "beam_full_width", - "fw_threshold": 0.2, + "function": "bunch_length_op", + "fw_threshold": 0.1, "no_client_timeout": 0, "image_background_subtraction": true, - "slice_orientation": "horizontal" + "slice_orientation": "horizontal", + "replace": true, + "fw_level": 0.5 } \ No newline at end of file diff --git a/configuration/pipeline_config/test_furka_proc.json b/configuration/pipeline_config/test_furka_proc.json new file mode 100644 index 0000000..6d6b95c --- /dev/null +++ b/configuration/pipeline_config/test_furka_proc.json @@ -0,0 +1,24 @@ +{ + "name": "test_furka_proc", + "pipeline_type": "stream", + "mode": "PUB", + "function": "test_furka_proc.py", + "allow_type_changes": false, + "abort_on_timeout": true, + "abort_on_error": false, + "debug": true, + "block": false, + "enforce_pid": true, + "enforce_timestamp": true, + "check_timestamp": true, + "stream_timeout": 20, + "bsread_address": "", + "bsread_channels": [ + "SATES30-LSCP10-FNS:CH0:VAL_GET", + "SATES30-LSCP10-FNS:CH1:VAL_GET", + "SATES30-LSCP10-FNS:CH2:VAL_GET", + "SATES30-LSCP10-FNS:CH3:VAL_GET", + "SAT-CVME-TIFALL5:EvtSet" + ], + "reload": true +} \ No newline at end of file diff --git a/configuration/pipeline_config/xxx_sp.json b/configuration/pipeline_config/xxx_sp.json new file mode 100644 index 0000000..38b9dab --- /dev/null +++ b/configuration/pipeline_config/xxx_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": "xxx", + "name": "xxx_sp" +} \ No newline at end of file diff --git a/configuration/user_scripts/Furka_tt.py b/configuration/user_scripts/Furka_tt.py index d28d3d1..eeca4df 100644 --- a/configuration/user_scripts/Furka_tt.py +++ b/configuration/user_scripts/Furka_tt.py @@ -5,9 +5,61 @@ from collections import deque _logger = getLogger(__name__) - +Nbg=10 bg = deque([],Nbg) +#pattern = [1, 1, 1, 1, 0] +pix_min = 750 +pix_max = 1750 + +x_profile_BG = [] + + + +def _interpolate_row(y_known, x_known, x_interp): + y_interp = np.interp(x_interp, x_known, y_known) + return y_interp + + + +def find_edge(data, step_length=100, edge_type="rising", refinement=1): + # refine data + data_length = data.shape[0] + refined_data = np.apply_along_axis( + _interpolate_row, + axis=0, + arr=data, + x_known=np.arange(data_length), + x_interp=np.arange(0, data_length - 1, refinement), + ) + + # prepare a step function and refine it + step_waveform = np.ones(shape=(step_length,)) + if edge_type == "rising": + step_waveform[: int(step_length / 2)] = -1 + elif edge_type == "falling": + step_waveform[int(step_length / 2) :] = -1 + + step_waveform = np.interp( + x=np.arange(0, step_length - 1, refinement), xp=np.arange(step_length), fp=step_waveform + ) + + # find edges + xcorr = np.apply_along_axis(np.correlate, 0, refined_data, v=step_waveform, mode="valid") + edge_position = np.argmax(xcorr, axis=0).astype(float) * refinement + xcorr_amplitude = np.amax(xcorr, axis=0) + + # correct edge_position for step_length + edge_position += np.floor(step_length / 2) + + return {"edge_pos": edge_position, "xcorr": xcorr, "xcorr_ampl": xcorr_amplitude, "signal":data} + + + + + + + def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None): @@ -22,14 +74,17 @@ def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata - - - + sig = x_profile / x_profile_BG -1 + edge_pos= find_edge(sig[ pix_min : pix_max ])["edge_pos"] + pix_min + xcorr= find_edge(sig[ pix_min : pix_max ])["xcorr"] #return_value[prefix+"min_value"] = min_value #return_value[prefix+"max_value"] = max_value return_value[prefix+"x_profile"] = x_profile return_value[prefix+"y_profile"] = y_profile return_value[prefix+"intensity"] = intensity - return_value[prefix+"step"] = 0 + return_value[prefix+"sig"] = sig + return_value[prefix+"edge_pos"] = edge_pos + return_value[prefix+"xcorr"] = xcorr + return return_value diff --git a/configuration/user_scripts/SARES11-SPEC125-M1_2tt.py b/configuration/user_scripts/SARES11-SPEC125-M1_2tt.py index c8ffc7c..9a92ce0 100644 --- a/configuration/user_scripts/SARES11-SPEC125-M1_2tt.py +++ b/configuration/user_scripts/SARES11-SPEC125-M1_2tt.py @@ -11,8 +11,8 @@ import numpy as np _logger = getLogger(__name__) # Alvra spectral encoder constants/waveforms -px2fs = 2.35 # calibration from 2023-06-22 -px2fs2 = 2.34 # calibration from 2023-06-22 +px2fs = 2.152 # 2.35 calibration from 2023-06-22 +px2fs2 = 2.074 # 2.34 calibration from 2023-06-22 lambdas = np.linspace(504.17385, 608.07410, num=2048) # calibration from 2023-04-25 #lambdas = 528.34 + 0.0261*np.arange(0,2048) # calibration from 2021-10-06 #lambdas = np.linspace(510.57796, 628.63459, num=2048) # calibration from 2022-05-18 diff --git a/configuration/user_scripts/SARES11-SPEC125-M3_spec.py b/configuration/user_scripts/SARES11-SPEC125-M3_spec.py new file mode 100644 index 0000000..c3ac69c --- /dev/null +++ b/configuration/user_scripts/SARES11-SPEC125-M3_spec.py @@ -0,0 +1,33 @@ +from cam_server.pipeline.data_processing import functions, processor + +import sys +import json + +from logging import getLogger +import numpy as np + +def get_roi_projection(image, roi, axis): + x_start, x_stop, y_start, y_stop = roi + cropped = image[y_start:y_stop, x_start:x_stop] + project = cropped.sum(axis=axis) + return project.astype("int64") + +def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None): + image = image.astype(int) + roi_signal = parameters.get("roi_signal") + roi_background = parameters.get("roi_background") + camera_name = parameters.get("camera_name") + project_axis = parameters.get("project_axis", 0) + + spectrum = get_roi_projection(image, roi_signal, project_axis) + background = get_roi_projection(image, roi_background, project_axis) + +# ret = processor.process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata) +# return ret + + res = { + camera_name + ".spectrum": spectrum, + camera_name + ".background": background + } + + return res \ No newline at end of file diff --git a/configuration/user_scripts/SARES30-CAMS156-SMX-OAV_jetprojections.py b/configuration/user_scripts/SARES30-CAMS156-SMX-OAV_jetprojections.py new file mode 100644 index 0000000..e191e02 --- /dev/null +++ b/configuration/user_scripts/SARES30-CAMS156-SMX-OAV_jetprojections.py @@ -0,0 +1,74 @@ +from cam_server.pipeline.data_processing import functions, processor + +import json +import scipy.signal +import numpy as np +from collections import deque +from logging import getLogger + +_logger = getLogger(__name__) + +background = deque(maxlen=4) + +DEFAULT_ROI_SIGNAL = None +DEFAULT_ROI_BACKGROUND = None + +um_per_px = 1 # calibrated 2023-09-29 with pco edge 4.2 and 90% zoom, 49% focus + +def get_roi_projection(image, roi, axis): + x_start, x_stop, y_start, y_stop = roi + cropped = image[x_start:x_stop, y_start:y_stop] + project = cropped.mean(axis=axis) + return project + +def find_spacing(py, extend=5): + "finds the spacing of a ladder on a high viscosity jet from the microscope images" + + py -= py.mean() + + if extend > 1: + py = np.concatenate((py, np.zeros(len(py) * extend))) + + spectrum = np.abs(np.fft.fft(py)) + freq = np.fft.fftfreq(len(spectrum)) + + which = (freq > 0.005) + spectrum = spectrum[which] + freq = freq[which] + + index_peaks = scipy.signal.find_peaks(spectrum)[0] + peaks_pos = freq[index_peaks] + peak_height = spectrum[index_peaks] + + try: + cut_freq = peaks_pos[np.argmax(peak_height)] + except: + cut_freq = float("NaN") + return freq, spectrum, cut_freq + + +def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None): + + processed_data = dict() + + if bsdata is not None: + processed_data.update(bsdata) + + #event = processed_data.get("SAR-CVME-TIFALL4:EvtSet", None) + image = image.astype("int64") + image_property_name = parameters["camera_name"] + roi_signal = parameters.get("roi_signal", DEFAULT_ROI_SIGNAL) + + processed_data[image_property_name + ".processing_parameters"] = json.dumps({"roi_signal": roi_signal}) + + if roi_signal: + jet_projection = get_roi_projection(image, roi_signal, 1) + processed_data[image_property_name + ".jet_projection"] = jet_projection + jet_width = get_roi_projection(image, roi_signal, 0) + processed_data[image_property_name + ".jet_width"] = jet_width + + freq, spectrum, cut_freq = find_spacing(jet_projection, extend=10) + jet_spacing = um_per_px / cut_freq + processed_data[image_property_name + ".jet_spacing"] = jet_spacing + + return processed_data \ No newline at end of file diff --git a/configuration/user_scripts/SAROP21-ATT01_Debug_proc.py b/configuration/user_scripts/SAROP21-ATT01_Debug_proc.py index 64c6afc..84f655e 100644 --- a/configuration/user_scripts/SAROP21-ATT01_Debug_proc.py +++ b/configuration/user_scripts/SAROP21-ATT01_Debug_proc.py @@ -100,7 +100,10 @@ def process(data, pulse_id, timestamp, params): if buffer_dark: output[f"{device}:avg_dark_wf"] = np.mean(buffer_dark, axis=0) else: - output[f"{device}:avg_dark_wf"] = np.zeros_like(prof_sig) + #output[f"{device}:avg_dark_wf"] = np.zeros_like(prof_sig) + #Changed By Gobbo to avoid type errors + output[f"{device}:avg_dark_wf"] = None # np.zeros_like(prof_sig) + # if buffer_savgol: # output[f"{device}:avg_dark_wf_savgol"] = np.mean(buffer_savgol, axis=0) diff --git a/configuration/user_scripts/bunch_length_op.py b/configuration/user_scripts/bunch_length_op.py new file mode 100644 index 0000000..6e96752 --- /dev/null +++ b/configuration/user_scripts/bunch_length_op.py @@ -0,0 +1,90 @@ +import sys +import numpy as np +import scipy.optimize +from logging import getLogger +from cam_server.pipeline.data_processing import functions, processor + +_logger = getLogger(__name__) + +def gauss_function_op(x, H, A, x0, sigma): + return H + A * np.exp(-(x - x0)**2 / (2 * sigma**2)) + +def gauss_fit_op(x, y): + H = min(y) + A = max(y) - min(y) + x0 = x[y.argmax()] + surface = np.trapz((y - H), x=x) + sigma = surface / (A * np.sqrt(2 * np.pi)) if A != 0 else 1 + try: + opt_par, cov_par = scipy.optimize.curve_fit(gauss_function_op, x, y, p0=[H, A, x0, sigma]) + except BaseException as e: + opt_par = np.array([H, A, x0, sigma]).astype("float64") + return opt_par + +def gauss_op(x, y): + H, A, x0, sigma = gauss_fit_op(x, y) + sigma = abs(sigma) + gauss = gauss_function_op(x, H, A, x0, sigma) + y = y - H # remove offset + y = y / sum(y) if sum(y) != 0 else y # normalise to 1 + condition = np.abs(x - x0) > 5 * sigma + y[condition] = 0.0 # remove outliers + com = sum(x * y) + x = x - com + rms = np.sqrt(np.abs(sum(x**2 * y))) # y can have negative values + return gauss, H, A, x0, sigma, com, rms + +def get_fw(x, y, level=0.5): + try: + ymax, ymin = np.amax(y), np.amin(y) + thr = (ymax - ymin) * level + imax, i1, i2 = np.argmax(y), 0, len(x)-1 + for i in range(imax - 1, 0, -1): + if (y[i] - ymin) <= thr: + i1 = i + break + for i in range(imax + 1, len(x), 1): + if (y[i] - ymin) <= thr: + i2 = i + break + slope1 = (y[i1 + 1] - y[i1]) / (x[i1 + 1] - x[i1]) + slope2 = (y[i2] - y[i2 - 1]) / (x[i2] - x[i2 - 1]) + dx1 = (ymin + thr - y[i1]) / slope1 + dx2 = (ymin + thr - y[i2]) / slope2 + fw = abs((x[i2] + dx2) - (x[i1] + dx1)) + return fw + except: + return 0.0 + +def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None): + try: + ret = processor.process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata) + replace = parameters.get("replace", True) + level = parameters.get("fw_threshold", 0.5) + sufix = "" if replace else "_op" + x_axis = ret["x_axis"] + y_axis = ret["y_axis"] + x_profile = ret["x_profile"] + y_profile = ret["y_profile"] + gauss, H, A, x0, sigma, com, rms = gauss_op(x_axis, x_profile) + ret["x_fit_offset" + sufix] = H + ret["x_fit_amplitude" + sufix] = A + ret["x_fit_mean" + sufix] = x0 + ret["x_fit_standard_deviation" + sufix] = sigma + ret["x_center_of_mass" + sufix] = com + ret["x_rms" + sufix] = rms + fw = get_fw(x_axis, x_profile, level) + ret["x_fw" + sufix] = fw + gauss, H, A, x0, sigma, com, rms = gauss_op(y_axis, y_profile) + ret["y_fit_offset" + sufix] = H + ret["y_fit_amplitude" + sufix] = A + ret["y_fit_mean" + sufix] = x0 + ret["y_fit_standard_deviation" + sufix] = sigma + ret["y_center_of_mass" + sufix] = com + ret["y_rms" + sufix] = rms + fw = get_fw(y_axis, y_profile, level) + ret["y_fw" + sufix] = fw + return ret + except Exception as e: + _logger.warning(sys.exc_info()) + return None diff --git a/configuration/user_scripts/pbps_fft.py b/configuration/user_scripts/pbps_fft.py new file mode 100644 index 0000000..59076c3 --- /dev/null +++ b/configuration/user_scripts/pbps_fft.py @@ -0,0 +1,189 @@ +import time +from collections import defaultdict, deque +from functools import partial +from logging import getLogger +from threading import Thread + +import epics +import numpy as np +from cam_server.utils import create_thread_pvs, epics_lock + +_logger = getLogger(__name__) + +initialized = False +intensity_pv, xpos_pv, ypos_pv = None, None, None +sent_pid = -1 + +dif_vals = defaultdict(int) + +# this is to avoid exceptions in the 'process' function upon appending to buffers if not all of +# them were created in the 'initialize' function +buffers = defaultdict(partial(deque, maxlen=1)) + + +def initialize(params): + global initialized + + epics.ca.clear_cache() + + for label in ("xpos_all", "ypos_all", "xpos_odd", "ypos_odd", "xpos_evn", "ypos_evn"): + x_pvname = params[f"{label}_x_pvname"] + y_pvname = params[f"{label}_y_pvname"] + m_pvname = params[f"{label}_m_pvname"] + w_pvname = params[f"{label}_w_pvname"] + + if x_pvname and y_pvname and m_pvname and w_pvname: + buffer = deque(maxlen=params["queue_length"]) + buffers[label] = buffer + + thread = Thread(target=update_PVs, args=(label, buffer, x_pvname, y_pvname, m_pvname, w_pvname)) + thread.start() + + # diff PVs + xpos_dif_m_pvname = params["xpos_dif_m_pvname"] + xpos_dif_w_pvname = params["xpos_dif_w_pvname"] + ypos_dif_m_pvname = params["ypos_dif_m_pvname"] + ypos_dif_w_pvname = params["ypos_dif_w_pvname"] + + thread = Thread(target=update_dif_PVs, args=(xpos_dif_m_pvname, xpos_dif_w_pvname, ypos_dif_m_pvname, ypos_dif_w_pvname)) + thread.start() + + initialized = True + + +def update_PVs(label, buffer, x_pvname, y_pvname, m_pvname, w_pvname): + x_pv, y_pv, m_pv, w_pv = create_thread_pvs([x_pvname, y_pvname, m_pvname, w_pvname]) + + x_pv.wait_for_connection() + y_pv.wait_for_connection() + m_pv.wait_for_connection() + w_pv.wait_for_connection() + if not (x_pv.connected and y_pv.connected and m_pv.connected and w_pv.connected): + raise (f"Cannot connect to {label} PVs.") + + x_pv.put(np.arange(buffer.maxlen)) + y_pv.put(np.zeros(buffer.maxlen)) + m_pv.put(0) + w_pv.put(0) + + while True: + time.sleep(3) + if len(buffer) != buffer.maxlen: + continue + + _buffer = np.array(buffer) + _buffer = _buffer[~np.isnan(_buffer)] + + # histogram changed to fft + sample_rate = 100 + y_hist =np.fft.fft(_buffer) + x_hist = np.fft.fftfreq(y_hist.size, d = 1/sample_rate) + #y_hist, x_hist = np.histogram(_buffer, bins=101) + #x_hist = (x_hist[1:] + x_hist[:-1]) / 2 + + + x_pv.put(x_hist) + y_pv.put(y_hist) + + # stats + mean_val = np.mean(_buffer) + std_val = np.std(_buffer) + + m_pv.put(mean_val) + w_pv.put(std_val) + + dif_vals[f"{label}_m"] = mean_val + dif_vals[f"{label}_w"] = std_val + + +def update_dif_PVs(xpos_dif_m_pvname, xpos_dif_w_pvname, ypos_dif_m_pvname, ypos_dif_w_pvname): + xpos_dif_m_pv, xpos_dif_w_pv, ypos_dif_m_pv, ypos_dif_w_pv = create_thread_pvs( + [xpos_dif_m_pvname, xpos_dif_w_pvname, ypos_dif_m_pvname, ypos_dif_w_pvname] + ) + + xpos_dif_m_pv.wait_for_connection() + xpos_dif_w_pv.wait_for_connection() + ypos_dif_m_pv.wait_for_connection() + ypos_dif_w_pv.wait_for_connection() + if not (xpos_dif_m_pv.connected and xpos_dif_w_pv.connected and ypos_dif_m_pv.connected and ypos_dif_w_pv.connected): + raise (f"Cannot connect to dif PVs.") + + while True: + time.sleep(3) + xpos_dif_m_pv.put(dif_vals["xpos_odd_m"] - dif_vals["xpos_evn_m"]) + xpos_dif_w_pv.put(dif_vals["xpos_odd_w"] - dif_vals["xpos_evn_w"]) + ypos_dif_m_pv.put(dif_vals["ypos_odd_m"] - dif_vals["ypos_evn_m"]) + ypos_dif_w_pv.put(dif_vals["ypos_odd_w"] - dif_vals["ypos_evn_w"]) + + +def process(data, pulse_id, timestamp, params): + try: + global sent_pid + global intensity_pv, xpos_pv, ypos_pv + # Initialize on first run + if not initialized: + initialize(params) + + # Read stream inputs + up = data[params["up"]] * params["up_calib"] + down = data[params["down"]] * params["down_calib"] + right = data[params["right"]] * params["right_calib"] + left = data[params["left"]] * params["left_calib"] + + # Calculations + try: + intensity = down + up + left + right + intensity_uJ = intensity * params["uJ_calib"] + except: + intensity = np.nan + intensity_uJ = np.nan + + if intensity > params["threshold"]: + xpos = ((right - left) / (right + left)) * params["horiz_calib"] + ypos = ((up - down) / (up + down)) * params["vert_calib"] + else: + xpos = 1.5 + ypos = 1.5 + + # Update buffers + buffers["xpos_all"].append(xpos) + buffers["ypos_all"].append(ypos) + if pulse_id % 2: + buffers["xpos_odd"].append(xpos) + buffers["ypos_odd"].append(ypos) + else: + buffers["xpos_evn"].append(xpos) + buffers["ypos_evn"].append(ypos) + + device, _ = params["up"].split(":", 1) + intensity_ch_name = device + ":INTENSITY" + xpos_ch_name = device + ":XPOS" + ypos_ch_name = device + ":YPOS" + + # Set bs outputs + output = {} + output[intensity_ch_name] = intensity + output[f"{device}:INTENSITY_UJ"] = intensity_uJ + output[xpos_ch_name] = xpos + output[ypos_ch_name] = ypos + + intensity_pv, xpos_pv, ypos_pv = create_thread_pvs([intensity_ch_name, xpos_ch_name, ypos_ch_name]) + if epics_lock.acquire(False): + try: + if pulse_id > sent_pid: + sent_pid = pulse_id + if intensity_pv and intensity_pv.connected: + intensity_pv.put(output[intensity_ch_name]) + + if xpos_pv and xpos_pv.connected: + xpos_pv.put(output[xpos_ch_name]) + + if ypos_pv and ypos_pv.connected: + ypos_pv.put(output[ypos_ch_name]) + + finally: + epics_lock.release() + + return output + except Exception as e: + _logger.exception(e) \ No newline at end of file diff --git a/configuration/user_scripts/pprm_simple.py b/configuration/user_scripts/pprm_simple.py index 64cda9e..87b1339 100644 --- a/configuration/user_scripts/pprm_simple.py +++ b/configuration/user_scripts/pprm_simple.py @@ -10,10 +10,14 @@ def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata (x_profile, y_profile) = functions.get_x_y_profile(image) _, _, _, x_fit_mean, _, _, _ = functions.gauss_fit(x_profile, x_axis) _, _, _, y_fit_mean, _, _, _ = 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+":x_fit_mean"] = x_fit_mean ret[prefix+":y_fit_mean"] = y_fit_mean + ret[prefix+":x_fwhm"] = x_fwhm + ret[prefix+":y_fwhm"] = y_fwhm return ret diff --git a/configuration/user_scripts/spectral_brightness.py b/configuration/user_scripts/spectral_brightness.py new file mode 100644 index 0000000..75b1b7b --- /dev/null +++ b/configuration/user_scripts/spectral_brightness.py @@ -0,0 +1,64 @@ +import time +from collections import defaultdict, deque +from functools import partial +from logging import getLogger +from threading import Thread + +import epics +import numpy as np +from cam_server.utils import create_thread_pvs, epics_lock + +_logger = getLogger(__name__) + +initialized = False +output_pv = None +sent_pid = -1 + + +def initialize(params): + global initialized + global output_pvname + epics.ca.clear_cache() + output_pvname = params["out_PV"] + initialized = True + + + +def process(data, pulse_id, timestamp, params): + try: + global sent_pid + global output_pv + global output_pvname + # Initialize on first run + if not initialized: + initialize(params) + + # Read stream inputs + intensity = data[params["intensity"]] + FWHM = data[params["FWHM"]] + + # Calculations + try: + spectral_brightness = intensity/FWHM + + except: + spectral_brightness = "999" + + + + # Set bs outputs + output = {} + output["FIT-BRT"] = spectral_brightness + output_pvname = params["out_PV"] + output_pv = create_thread_pvs([output_pvname]) + if epics_lock.acquire(False): + try: + if pulse_id > sent_pid: + sent_pid = pulse_id + if output_pv and output_pv.connected: + output_pv.put(spectral_brightness) + finally: + epics_lock.release() + return output + except Exception as e: + _logger.exception(e) diff --git a/configuration/user_scripts/spectral_brightness_test.py b/configuration/user_scripts/spectral_brightness_test.py new file mode 100644 index 0000000..ac39cdb --- /dev/null +++ b/configuration/user_scripts/spectral_brightness_test.py @@ -0,0 +1,38 @@ +import time +from collections import defaultdict, deque +from functools import partial +from logging import getLogger +from threading import Thread + +import epics +import numpy as np +from cam_server.utils import create_thread_pvs, epics_lock + +_logger = getLogger(__name__) + +initialized = False +output_pv = None +sent_pid = -1 + + +def initialize(params): + global initialized + global output_pvname + epics.ca.clear_cache() + output_pvname = params["out_PV"] + initialized = True + + + +def process(data, pulse_id, timestamp, params): + if not initialized: + initialize(params) + spectral_brightness = data[params["intensity"]]/data[params["FWHM"]] + output = {} + output["Intensity"] = data[params["intensity"]] + output["FWHM"] = data[params["FWHM"]] + output["spectral_brightness"] = spectral_brightness + # try update pv + output_pv = epics.PV(params["out_PV"]) + output_pv.put(str(spectral_brightness)) + return output diff --git a/configuration/user_scripts/test_furka_proc.py b/configuration/user_scripts/test_furka_proc.py new file mode 100644 index 0000000..7ccc576 --- /dev/null +++ b/configuration/user_scripts/test_furka_proc.py @@ -0,0 +1,55 @@ +from collections import deque +from logging import getLogger + +import numpy as np +from scipy import signal + +bg_dim = 10 + +bg1_deq = deque([],bg_dim) +bg2_deq = deque([],bg_dim) +bg3_deq = deque([],bg_dim) + + +initialized = False + + + +def process(data, pulse_id, timestamp, params): + ch0 = data["SATES30-LSCP10-FNS:CH0:VAL_GET"] + ch1 = data["SATES30-LSCP10-FNS:CH1:VAL_GET"] + ch2 = data["SATES30-LSCP10-FNS:CH2:VAL_GET"] + ch3 = data["SATES30-LSCP10-FNS:CH3:VAL_GET"] + evt = data["SAT-CVME-TIFALL5:EvtSet"][154] + + + + if evt==1: + bg1_deq.append(ch1) + bg2_deq.append(ch2) + bg3_deq.append(ch3) + + + bg1 = np.mean(np.array(bg1_deq)) + bg2 = np.mean(np.array(bg2_deq)) + bg3 = np.mean(np.array(bg3_deq)) + + + sig1 = ch1/bg1 -1 + sig2 = ch2/bg2 -1 + sig3 = ch3/bg3 -1 + + + ret = {} + ret["ch1"] = ch1 + ret["ch2"] = ch2 + ret["ch2"] = ch3 + ret["evt"] = evt + ret["bg1"] = bg1 + ret["bg2"] = bg2 + ret["bg3"] = bg3 + ret["sig1"] = sig1 + ret["sig2"] = sig2 + ret["sig3"] = sig3 + + return ret diff --git a/configuration/user_scripts/test_new.py b/configuration/user_scripts/test_new.py index 57db06f..c5565ee 100644 --- a/configuration/user_scripts/test_new.py +++ b/configuration/user_scripts/test_new.py @@ -1,5 +1,12 @@ from cam_server.pipeline.data_processing import functions, processor +from logging import getLogger +_logger = getLogger(__name__) +count = 0 def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None): + global count ret = processor.process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata) + + _logger.info("Success processing transparent " + str (count)) + count = count + 1 return ret \ No newline at end of file