Add repeaters for pipelines pushing to databuffer
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:9004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:11004" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10005" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:9006" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:11006" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:9007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:11007" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10008" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10008", "output": "tcp://0.0.0.0:9008" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10008", "output": "tcp://0.0.0.0:11008" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10009" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10009", "output": "tcp://0.0.0.0:9009" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10009", "output": "tcp://0.0.0.0:11009" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10010" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10010", "output": "tcp://0.0.0.0:9010" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10010", "output": "tcp://0.0.0.0:11010" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:9011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:11011" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10012" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10012", "output": "tcp://0.0.0.0:9012" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10012", "output": "tcp://0.0.0.0:11012" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10013" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10013", "output": "tcp://0.0.0.0:9013" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10013", "output": "tcp://0.0.0.0:11013" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10014" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10014", "output": "tcp://0.0.0.0:9014" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10014", "output": "tcp://0.0.0.0:11014" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10016" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10016", "output": "tcp://0.0.0.0:9016" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10016", "output": "tcp://0.0.0.0:11016" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10017" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10017", "output": "tcp://0.0.0.0:9017" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10017", "output": "tcp://0.0.0.0:11017" }
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:9000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:11000" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10002" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10002", "output": "tcp://0.0.0.0:9002" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10002", "output": "tcp://0.0.0.0:11002" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:9004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:11004" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10005" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10005", "output": "tcp://0.0.0.0:9005" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10005", "output": "tcp://0.0.0.0:11005" }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:8889" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:9004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:11004" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10005" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10005", "output": "tcp://0.0.0.0:9005" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10005", "output": "tcp://0.0.0.0:11005" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10006" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:9006" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:11006" }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:9000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:11000" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:9011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:11011" }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10009" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10009", "output": "tcp://0.0.0.0:9009" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10009", "output": "tcp://0.0.0.0:11009" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:9011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:11011" }
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:9007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:11007" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10008" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10008", "output": "tcp://0.0.0.0:9008" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10008", "output": "tcp://0.0.0.0:11008" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:9011" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10011", "output": "tcp://0.0.0.0:11011" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10014" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10014", "output": "tcp://0.0.0.0:9014" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10014", "output": "tcp://0.0.0.0:11014" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10015" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10015", "output": "tcp://0.0.0.0:9015" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10015", "output": "tcp://0.0.0.0:11015" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10016" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10016", "output": "tcp://0.0.0.0:9016" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10016", "output": "tcp://0.0.0.0:11016" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10017" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10017", "output": "tcp://0.0.0.0:9017" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10017", "output": "tcp://0.0.0.0:11017" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10018" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10018", "output": "tcp://0.0.0.0:9018" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10018", "output": "tcp://0.0.0.0:11018" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10021" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10021", "output": "tcp://0.0.0.0:9021" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10021", "output": "tcp://0.0.0.0:11021" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10022" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10022", "output": "tcp://0.0.0.0:9022" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10022", "output": "tcp://0.0.0.0:11022" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10023" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10023", "output": "tcp://0.0.0.0:9023" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10023", "output": "tcp://0.0.0.0:11023" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10024" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10024", "output": "tcp://0.0.0.0:9024" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10024", "output": "tcp://0.0.0.0:11024" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10025" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10025", "output": "tcp://0.0.0.0:9025" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10025", "output": "tcp://0.0.0.0:11025" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10026" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10026", "output": "tcp://0.0.0.0:9026" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10026", "output": "tcp://0.0.0.0:11026" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10027" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10027", "output": "tcp://0.0.0.0:9027" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10027", "output": "tcp://0.0.0.0:11027" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10028" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10028", "output": "tcp://0.0.0.0:9028" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10028", "output": "tcp://0.0.0.0:11028" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10033" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10033", "output": "tcp://0.0.0.0:9033" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10033", "output": "tcp://0.0.0.0:11033" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10035" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10035", "output": "tcp://0.0.0.0:9035" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10035", "output": "tcp://0.0.0.0:11035" }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:9000" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10000", "output": "tcp://0.0.0.0:11000" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10002" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10002", "output": "tcp://0.0.0.0:9002" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10002", "output": "tcp://0.0.0.0:11002" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:9004" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10004", "output": "tcp://0.0.0.0:11004" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10006" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:9006" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10006", "output": "tcp://0.0.0.0:11006" }
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:9001" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10001", "output": "tcp://0.0.0.0:11001" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:9003" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10003", "output": "tcp://0.0.0.0:11003" }
|
||||
{ "kind": "add-source", "source": "tcp://localhost:10007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:9007" }
|
||||
{ "kind": "add-output", "source": "tcp://localhost:10007", "output": "tcp://0.0.0.0:11007" }
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"mirror_x": true,
|
||||
"mirror_y": false,
|
||||
"rotate": 1,
|
||||
"rotate": 0,
|
||||
"roi": null,
|
||||
"image_background": null,
|
||||
"source_type": "bsread",
|
||||
|
||||
@@ -33,5 +33,5 @@
|
||||
],
|
||||
"alias": [],
|
||||
"protocol": "tcp",
|
||||
"forwarder_port": 8890
|
||||
"forwarder_port": 8891
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"camera_calibration": {
|
||||
"reference_marker": [
|
||||
304,
|
||||
135,
|
||||
411,
|
||||
245
|
||||
253,
|
||||
240,
|
||||
607,
|
||||
303
|
||||
],
|
||||
"reference_marker_width": 5000.0,
|
||||
"reference_marker_height": 5000.0,
|
||||
"angle_horizontal": 0.0,
|
||||
"angle_vertical": 0.0
|
||||
},
|
||||
"mirror_x": false,
|
||||
"mirror_x": true,
|
||||
"mirror_y": false,
|
||||
"rotate": 0,
|
||||
"roi": null,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"SARES30-CAMS156-XE": "SARES30-CAMS156-XE",
|
||||
"SARFE10-PPRM064": "SARFE10-PPRM064",
|
||||
"SARFE10-PSSS059": "SARFE10-PSSS059",
|
||||
"SARFE10-PSSS059-LB": "SARFE10-PSSS059-LB",
|
||||
"SAROP31-PPRM113": "SAROP31-PPRM113",
|
||||
"SAROP31-PPRM150": "SAROP31-PPRM150",
|
||||
"SATBD02-DSCR050": "SATBD02-DSCR050",
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SARFE10-PSSS059"
|
||||
"SARFE10-PSSS059",
|
||||
"SARFE10-PSSS059-LB"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-12.psi.ch:8880": {
|
||||
|
||||
@@ -17,12 +17,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.19215574732326865,
|
||||
"down_calib": 0.19161095135374767,
|
||||
"left_calib": 0.4934418822887078,
|
||||
"right_calib": 0.3066554301618752,
|
||||
"horiz_calib": -3.9880710835817026,
|
||||
"vert_calib": -15.697106429975813,
|
||||
"up_calib": 0.31030690855352083,
|
||||
"down_calib": 0.2989389667915612,
|
||||
"left_calib": 0.9720828246227724,
|
||||
"right_calib": 0.5192190502692535,
|
||||
"horiz_calib": -3.3265293104693368,
|
||||
"vert_calib": -5.3478181348925276,
|
||||
"uJ_calib": 834.5191797495979,
|
||||
"threshold": 0,
|
||||
"queue_length": 5000,
|
||||
@@ -60,9 +60,9 @@
|
||||
0.3
|
||||
],
|
||||
"calib_x_norm": [
|
||||
0.07446858822356554,
|
||||
-0.0004189459440790225,
|
||||
-0.07598008418603895
|
||||
0.09063772035588682,
|
||||
0.00015992262997635781,
|
||||
-0.08973044838733299
|
||||
],
|
||||
"calib_y_range": [
|
||||
-0.3,
|
||||
@@ -70,20 +70,20 @@
|
||||
0.3
|
||||
],
|
||||
"calib_y_norm": [
|
||||
0.020097238728032586,
|
||||
0.00016566847491786981,
|
||||
-0.018126366538108462
|
||||
0.05568183827385131,
|
||||
-0.0010187375058931837,
|
||||
-0.0565134505085444
|
||||
],
|
||||
"calib_time": "2022-11-28 16:19:37",
|
||||
"calib_datetime": "2023-04-24 14:21:56",
|
||||
"calib_datetime": "2023-06-15 11:49:49",
|
||||
"calib_x_norm_std": [
|
||||
0.042364754079521505,
|
||||
0.04270600465262558,
|
||||
0.0422035733818831
|
||||
0.5232838200763255,
|
||||
0.4294839304720719,
|
||||
0.4262347639579865
|
||||
],
|
||||
"calib_y_norm_std": [
|
||||
0.030202455249566967,
|
||||
0.029892666541751815,
|
||||
0.02977800503470968
|
||||
0.4274679840038726,
|
||||
0.42865463546070826,
|
||||
0.4274231753434611
|
||||
]
|
||||
}
|
||||
@@ -7,5 +7,6 @@
|
||||
"image_slices": null,
|
||||
"pipeline_type": "processing",
|
||||
"camera_name": "SARFE10-PSSS055",
|
||||
"name": "SARFE10-PSSS055_sp"
|
||||
"name": "SARFE10-PSSS055_sp",
|
||||
"max_frame_rate": 2.1
|
||||
}
|
||||
@@ -7,5 +7,6 @@
|
||||
"image_slices": null,
|
||||
"pipeline_type": "processing",
|
||||
"camera_name": "SARFE10-PSSS059-LB",
|
||||
"name": "SARFE10-PSSS059-LB_sp"
|
||||
"name": "SARFE10-PSSS059-LB_sp",
|
||||
"max_frame_rate": 2.1
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"image_background_enable": true,
|
||||
"image_background": "SARFE10-PSSS059_20221018_082530_225385",
|
||||
"image_background": "SARFE10-PSSS059_20230607_084402_142150",
|
||||
"image_threshold": null,
|
||||
"image_region_of_interest": null,
|
||||
"image_good_region": null,
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"down_calib": 0.5591511338550219,
|
||||
"down_calib": 4.5324470614670505,
|
||||
"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": -3.9958078717518144,
|
||||
"vert_calib": -5.948647343132842,
|
||||
"bsread_address": "",
|
||||
"right": "SAROP21-CVME-PBPS1:Lnk9Ch2-DATA-SUM",
|
||||
"ypos_dif_w_pvname": "SAROP21-PBPS103:YPOS-DIF-HIST-W",
|
||||
"ypos_odd_x_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-X",
|
||||
"function": "pbps.py",
|
||||
"port": "9009",
|
||||
"left_calib": 0.36904567566640284,
|
||||
"left_calib": 3.7713739377323887,
|
||||
"down": "SAROP21-CVME-PBPS1:Lnk9Ch3-DATA-SUM",
|
||||
"ypos_odd_w_pvname": "SAROP21-PBPS103:YPOS-ODD-HIST-W",
|
||||
"xpos_odd_y_pvname": "SAROP21-PBPS103:XPOS-ODD-HIST-Y",
|
||||
@@ -23,7 +23,7 @@
|
||||
"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": 4.361157752097061,
|
||||
"horiz_calib": 5.877930389958677,
|
||||
"ypos_all_m_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-M",
|
||||
"ypos_dif_m_pvname": "SAROP21-PBPS103:YPOS-DIF-HIST-M",
|
||||
"bsread_channels": [
|
||||
@@ -37,7 +37,7 @@
|
||||
"pipeline_type": "stream",
|
||||
"stream_timeout": 20,
|
||||
"ypos_all_x_pvname": "SAROP21-PBPS103:YPOS-ALL-HIST-X",
|
||||
"right_calib": 0.33414240272743095,
|
||||
"right_calib": 4.162146709541001,
|
||||
"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",
|
||||
@@ -51,7 +51,7 @@
|
||||
"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.535888712120923,
|
||||
"up_calib": 3.2578245863453357,
|
||||
"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",
|
||||
@@ -62,9 +62,9 @@
|
||||
0.3
|
||||
],
|
||||
"calib_x_norm": [
|
||||
-0.06947260244733981,
|
||||
-0.0005099883066721613,
|
||||
0.06810554402339729
|
||||
-0.05159687548223647,
|
||||
0.0030976096148912073,
|
||||
0.05047986925516048
|
||||
],
|
||||
"calib_y_range": [
|
||||
-0.3,
|
||||
@@ -72,19 +72,19 @@
|
||||
0.3
|
||||
],
|
||||
"calib_y_norm": [
|
||||
0.07645446869263132,
|
||||
0.00011733719876510883,
|
||||
-0.07370290104520648
|
||||
0.04818497108323218,
|
||||
-0.0036800338989988325,
|
||||
-0.05267829503265952
|
||||
],
|
||||
"calib_x_norm_std": [
|
||||
0.3832642548643102,
|
||||
0.36376451461448284,
|
||||
0.3725425364709937
|
||||
0.5534453968133013,
|
||||
0.5586548058581027,
|
||||
0.5708263868201827
|
||||
],
|
||||
"calib_y_norm_std": [
|
||||
0.3869867302072751,
|
||||
0.3994940062239071,
|
||||
0.3769217744089247
|
||||
0.5834826190307172,
|
||||
0.5671543665080663,
|
||||
0.5595596578916009
|
||||
],
|
||||
"calib_datetime": "2023-06-07 06:54:21"
|
||||
"calib_datetime": "2023-06-15 21:52:57"
|
||||
}
|
||||
@@ -3,12 +3,15 @@
|
||||
"image_background": "SATBD02-DSCR050_20221013_123827_350915",
|
||||
"image_threshold": null,
|
||||
"image_region_of_interest": [
|
||||
155,
|
||||
1216,
|
||||
52,
|
||||
1302
|
||||
183,
|
||||
1627,
|
||||
569,
|
||||
932
|
||||
],
|
||||
"image_good_region": null,
|
||||
"image_good_region": {
|
||||
"threshold": 0.10000000000000003,
|
||||
"gfscale": 5
|
||||
},
|
||||
"image_slices": null,
|
||||
"pipeline_type": "processing",
|
||||
"camera_name": "SATBD02-DSCR050",
|
||||
@@ -17,8 +20,8 @@
|
||||
"no_client_timeout": 0,
|
||||
"port": "9020",
|
||||
"Marker": [
|
||||
364,
|
||||
676
|
||||
848,
|
||||
594
|
||||
],
|
||||
"reload": true,
|
||||
"function": "beam_full_width",
|
||||
|
||||
@@ -19,5 +19,6 @@
|
||||
"threshold": "12",
|
||||
"project_axis": "0",
|
||||
"radial_x0": "587",
|
||||
"radial_y0": "550"
|
||||
"radial_y0": "550",
|
||||
"roi_background": ""
|
||||
}
|
||||
@@ -11,7 +11,8 @@
|
||||
"function": "single_photon.c",
|
||||
"mode": "PUSH",
|
||||
"block": false,
|
||||
"threshold": 10.0,
|
||||
"threshold": 100.0,
|
||||
"threshold_file": "/configuration/user_scripts/lib/threshold_2d_start600_800.txt",
|
||||
"_max_frame_rate": 5.1,
|
||||
"libs": "threshold_2d_start600_800.txt",
|
||||
"reload": true
|
||||
|
||||
@@ -30,25 +30,22 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"testdb_ib:9005",
|
||||
"SARFE10-PBPS053_proc:9004",
|
||||
"SAROP21-ATT01_proc:9003",
|
||||
"test_stream:9006",
|
||||
"SARFE10-PSSS059_psss_avg:9012",
|
||||
"SAROP21-PBPS103_proc:9009",
|
||||
"SAROP11-PBPS110_proc:9007",
|
||||
"SAROP31-PBPS113_proc:9013",
|
||||
"SAROP31-PBPS149_proc:9011",
|
||||
"SAROP11-PBPS122_proc:9010",
|
||||
"SAROP11-ATT01_proc:9016",
|
||||
"SAROP21-PBPS133_proc:9008",
|
||||
"SARFE10-PPRM064_ib:9015",
|
||||
"SARFE10-PBPS053_proc:10004",
|
||||
"SAROP21-ATT01_proc:10003",
|
||||
"test_stream:10006",
|
||||
"SARFE10-PSSS059_psss_avg:10012",
|
||||
"SAROP21-PBPS103_proc:10009",
|
||||
"SAROP11-PBPS110_proc:10007",
|
||||
"SAROP31-PBPS113_proc:10013",
|
||||
"SAROP31-PBPS149_proc:10011",
|
||||
"SAROP11-PBPS122_proc:10010",
|
||||
"SAROP11-ATT01_proc:10016",
|
||||
"SAROP21-PBPS133_proc:10008",
|
||||
"SATOP31-PMOS132-2D_sp",
|
||||
"SATOP21-PMOS127-2D_pmos:9017",
|
||||
"SATOP21-PMOS127-2D_pmos:10017",
|
||||
"SARFE10-PPRM064_sp",
|
||||
"SARFE10-PPRM064_proc:9014",
|
||||
"SATOP31-PMOS132-2D_pmos:9001",
|
||||
"SATOP31-PMOS132-2D_store:9002"
|
||||
"SARFE10-PPRM064_proc:10014",
|
||||
"SATOP31-PMOS132-2D_pmos:10001"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-08.psi.ch:8881": {
|
||||
@@ -89,45 +86,35 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SINBC02-DSRM310_profiles:9000",
|
||||
"SINDI02-DSCR075_profiles:9001",
|
||||
"S10BD01-DSCR030_profiles:9002",
|
||||
"S10BC02-DSRM310_profiles:9004",
|
||||
"S10BC02-DSRM310_ib:9015",
|
||||
"SINDI02-DSCR075_ib:9010",
|
||||
"SINBC02-DSRM310_ib:9011",
|
||||
"S10BD01-DSCR030_ib:9012",
|
||||
"SINBC02-DSRM310_profiles:10000",
|
||||
"SINDI02-DSCR075_profiles:10001",
|
||||
"S10BD01-DSCR030_profiles:10002",
|
||||
"S10BC02-DSRM310_profiles:10004",
|
||||
"SINDI02-DSCR075_sp",
|
||||
"SINBC02-DSRM310_sp",
|
||||
"S10BD01-DSCR030_sp",
|
||||
"SATBD02-DSCR050_sp:9020",
|
||||
"SATBD02-DSCR050_ib:9013",
|
||||
"SATBD02-DSCR050_db:9003",
|
||||
"SATBD02-DSCR050_db:10003",
|
||||
"SARCL01-DSCR170_sp",
|
||||
"SATBD01-DSCR120_sp",
|
||||
"SARCL01-DSCR170_ib:9014",
|
||||
"SARCL01-DSCR170_profiles:9005"
|
||||
"SARCL01-DSCR170_profiles:10005"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-11.psi.ch:8881": {
|
||||
"cameras": [
|
||||
"SARFE10-PSSS059",
|
||||
"SARFE10-PSSS059-LB",
|
||||
"SARES20-CAMS142-M3"
|
||||
],
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SARFE10-PSSS059_psss:8889",
|
||||
"SARFE10-PSSS059_store:8890",
|
||||
"SARFE10-PSSS059_psss:10001",
|
||||
"SARFE10-PSSS059_sp",
|
||||
"SARFE10-PSSS059_psss_avg:9005",
|
||||
"SARES20-CAMS142-M3_ib:9003",
|
||||
"SARFE10-PSSS059_psss_avg:10005",
|
||||
"SARES20-CAMS142-M3_sp",
|
||||
"SARES20-CAMS142-M3_spec:9004",
|
||||
"#SARES20-PROF142-M1_spec:9004",
|
||||
"#SARES20-PROF142-M1_ib:9003",
|
||||
"#SARES20-PROF141-M1_sp",
|
||||
"SARES20-CAMS142-M3_proc:9006"
|
||||
"SARES20-CAMS142-M3_spec:10004",
|
||||
"SARES20-CAMS142-M3_proc:10006"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-12.psi.ch:8881": {
|
||||
@@ -139,16 +126,12 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"bs_timing_test_perm:9000",
|
||||
"bs_timing_test_perm:10000",
|
||||
"SATES21-CAMS154-M1_sp",
|
||||
"SATES21-CAMS154-M1_spec_ib:9000",
|
||||
"SATES21-CAMS154-M1_spec_db:9001",
|
||||
"SATES21-CAMS154-M1_spec_db:10001",
|
||||
"SATES24-CAMS161-M1_sp",
|
||||
"SATES24-CAMS161-M1_spec_ib:9010",
|
||||
"SATES24-CAMS161-M1_spec_db:9011",
|
||||
"SATES21-CAMS154-GIGE7_sp",
|
||||
"SATES21-CAMS-PATT1_spec_db:9003",
|
||||
"SATES21-CAMS-PATT1_spec_ib:9002",
|
||||
"SATES24-CAMS161-M1_spec_db:10011",
|
||||
"SATES21-CAMS-PATT1_spec_db:10003",
|
||||
"SATES21-CAMS-PATT1_sp"
|
||||
]
|
||||
},
|
||||
@@ -165,16 +148,11 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SARES11-SPEC125-M1_psen_ib:9000",
|
||||
"SARES11-SPEC125-M1_psen_db:9001",
|
||||
"#SARES11-SPEC125-M1_test:9009",
|
||||
"#SARES11-SPEC125-M2_psen_ib:9010",
|
||||
"#SARES11-SPEC125-M2_psen_db:9011",
|
||||
"#SARES12-CAMS128-M1_psen_ib:9002",
|
||||
"#SARES12-CAMS128-M1_psen_db:9003",
|
||||
"SARES12-XPR128-C4F1_ib:9004",
|
||||
"SARES11-XMI125-C4P1_ib:9005",
|
||||
"SARES11-XMI125-C4P1_db:9011"
|
||||
"SARES11-SPEC125-M1_psen_db:10001",
|
||||
"#SARES11-SPEC125-M1_test:10009",
|
||||
"#SARES11-SPEC125-M2_psen_db:10011",
|
||||
"#SARES12-CAMS128-M1_psen_db:10003",
|
||||
"SARES11-XMI125-C4P1_db:10011"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-14.psi.ch:8881": {
|
||||
@@ -203,40 +181,31 @@
|
||||
"enabled": true,
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SARES20-CAMS142-M1_psen_ib:9002",
|
||||
"SARES20-CAMS142-M1_psen_db:9003",
|
||||
"SARES20-CAMS142-M4_psen_ib:9000",
|
||||
"SARES20-CAMS142-M4_psen_db:9001",
|
||||
"SARES20-CAMS142-M5_psen_ib:9010",
|
||||
"SAROP21-PPRM138_ib:9004",
|
||||
"SARES20-CAMS142-M1_psen_db:10003",
|
||||
"SARES20-CAMS142-M4_psen_db:10001",
|
||||
"SARES20-CAMS142-M5_psen_db:8011",
|
||||
"SARES20-CAMS142-M5_psen_db_proxy:9011",
|
||||
"SARES20-CAMS142-M5_psen_db_proxy:10011",
|
||||
"SARES20-PROF142-M1_sp",
|
||||
"#SARES20-PROF142-M1_ib:9005",
|
||||
"SARES20-PROF142-M1_proc:9017",
|
||||
"SAROP21-PPRM102_ib:9006",
|
||||
"SAROP21-PPRM133_ib:9019",
|
||||
"SAROP21-PPRM113_proc:9007",
|
||||
"SAROP21-PPRM138_proc:9015",
|
||||
"SARES20-PROF142-M1_proc:10017",
|
||||
"SAROP21-PPRM113_proc:10007",
|
||||
"SAROP21-PPRM138_proc:10015",
|
||||
"SAROP21-PPRM138_sp",
|
||||
"SARES20-PROF141-M1_sp",
|
||||
"SARES20-PROF141-M1_proc:9016",
|
||||
"SARES20-PROF141-M1_ib:9013",
|
||||
"SARES20-PROF141-M1_proc:10016",
|
||||
"SARES20-PROF146-M1_sp",
|
||||
"SARES20-PROF146-M1_proc:9018",
|
||||
"SARES20-DSDPPRM_proc:9014",
|
||||
"SARES20-DSDPPRM_ib:9020",
|
||||
"SLAAR21-LCAM-CS841_proc:9021",
|
||||
"SLAAR21-LCAM-CS842_proc:9022",
|
||||
"SLAAR21-LCAM-CS843_proc:9023",
|
||||
"SLAAR21-LCAM-CS844_proc:9024",
|
||||
"SLAAR02-LPMO01-C321_proc:9025",
|
||||
"SLAAR02-LPMO02-C322_proc:9026",
|
||||
"SLAAR21-LCAM-C561_proc:9027",
|
||||
"SLAAR21-LCAM-C562_proc:9028",
|
||||
"SLAAR21-LCAM-CT1C1_proc:9033",
|
||||
"SLAAR21-LCAM-CT1C2_proc:9035",
|
||||
"#arrival_time_proc:9008",
|
||||
"SARES20-PROF146-M1_proc:10018",
|
||||
"SARES20-DSDPPRM_proc:10014",
|
||||
"SLAAR21-LCAM-CS841_proc:10021",
|
||||
"SLAAR21-LCAM-CS842_proc:10022",
|
||||
"SLAAR21-LCAM-CS843_proc:10023",
|
||||
"SLAAR21-LCAM-CS844_proc:10024",
|
||||
"SLAAR02-LPMO01-C321_proc:10025",
|
||||
"SLAAR02-LPMO02-C322_proc:10026",
|
||||
"SLAAR21-LCAM-C561_proc:10027",
|
||||
"SLAAR21-LCAM-C562_proc:10028",
|
||||
"SLAAR21-LCAM-CT1C1_proc:10033",
|
||||
"SLAAR21-LCAM-CT1C2_proc:10035",
|
||||
"#arrival_time_proc:10008",
|
||||
"test_arrival"
|
||||
]
|
||||
},
|
||||
@@ -251,17 +220,14 @@
|
||||
"expanding": false,
|
||||
"instances": [
|
||||
"SATES31-CAMS187-RIXS1_sp",
|
||||
"SATES31-CAMS187-RIXS1_proc:9000",
|
||||
"SATES31-CAMS187-RIXS1_ib:9001",
|
||||
"SATES31-CAMS187-RIXS1_proc:10000",
|
||||
"SATES30-RIXS-CAM01_sp",
|
||||
"SATES30-RIXS-CAM01_proc:9006",
|
||||
"SATES30-RIXS-CAM01_proc:10006",
|
||||
"test_load_file",
|
||||
"SATES30-CAMS182-GIGE1_sp",
|
||||
"SATES30-CAMS182-GIGE2_sp",
|
||||
"SATES30-CAMS182-GIGE1_profiles:9002",
|
||||
"SATES30-CAMS182-GIGE1_ib:9003",
|
||||
"SATES30-CAMS182-GIGE2_profiles:9004",
|
||||
"SATES30-CAMS182-GIGE2_ib:9005"
|
||||
"SATES30-CAMS182-GIGE1_profiles:10002",
|
||||
"SATES30-CAMS182-GIGE2_profiles:10004"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-16.psi.ch:8881": {
|
||||
@@ -278,13 +244,9 @@
|
||||
"SARES30-CAMS156-PCO1_sp",
|
||||
"SAROP31-PPRM113_sp",
|
||||
"SAROP31-PPRM150_sp",
|
||||
"SAROP31-PPRM113_proc:9001",
|
||||
"SAROP31-PPRM113_ib:9000",
|
||||
"SAROP31-PPRM150_ib:9002",
|
||||
"SAROP31-PPRM150_proc:9003",
|
||||
"SARES30-CAMS156-PCO1_ib:9004",
|
||||
"SARES30-CAMS156-XE_ib:9006",
|
||||
"SARES30-CAMS156-XE_proc:9007"
|
||||
"SAROP31-PPRM113_proc:10001",
|
||||
"SAROP31-PPRM150_proc:10003",
|
||||
"SARES30-CAMS156-XE_proc:10007"
|
||||
]
|
||||
},
|
||||
"http://sf-daqsync-17.psi.ch:8881": {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <syslog.h>
|
||||
|
||||
|
||||
const char *CHANNEL_NAMES[] = {"EVENT_NUM", "EVENT_I", "EVENT_J", "EVENT_CHARGE", "EVENT_ETA_X", "EVENT_ETA_Y", "EVENT_I_INTERP", "EVENT_J_INTERP"};
|
||||
@@ -18,43 +19,27 @@ double evt_p[EVENT_CHANNELS][MAX_NUM_EVENTS];
|
||||
|
||||
int func_ph_1d_double( double *frame, int i_dim, int j_dim, double *th_m);
|
||||
|
||||
|
||||
void setArrayToValue(double array[], int size, double value) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Initialization: Threshold & background
|
||||
//Initialization: Threshold & background
|
||||
initialized = 0;
|
||||
//const char *THRESHOLD_FILE = "/configuration/user_scripts/lib/Thresh_2D_start600_size800.npy";
|
||||
const char *THRESHOLD_FILE = "/configuration/user_scripts/lib/threshold_2d_start600_800.txt";
|
||||
int threshold_num_elements=-1;
|
||||
double *threshold= NULL;
|
||||
double *background= NULL;
|
||||
double *background= NULL;
|
||||
const int MAX_LINE_LENGTH = 50000;
|
||||
|
||||
|
||||
int initialize(int size_x, int size_y, PyObject *pars){
|
||||
|
||||
//background (all matrices are indexed in 1d)
|
||||
background = malloc(size_x*size_y*sizeof(double));
|
||||
for(int i=0; i<size_y;i++) {
|
||||
for(int j=0;j<size_x;j++) {
|
||||
background[i*size_x+j]=0.0;
|
||||
}
|
||||
}
|
||||
|
||||
threshold = (double *)malloc(size_x*size_y*sizeof(double));
|
||||
int ret = 1;
|
||||
if (THRESHOLD_FILE!=NULL){
|
||||
FILE *file = fopen(THRESHOLD_FILE, "rb");
|
||||
int parseTextFile(const char * fileName, double *arr, int size_x, int size_y){
|
||||
FILE *file = fopen(fileName, "rb");
|
||||
if (file == NULL) {
|
||||
printf("Failed to open file.\n");
|
||||
syslog(LOG_ERR, "Failed to open data file: %s" , fileName);
|
||||
return -1;
|
||||
}
|
||||
int ret = 1;
|
||||
char line[MAX_LINE_LENGTH];
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
@@ -67,39 +52,70 @@ int initialize(int size_x, int size_y, PyObject *pars){
|
||||
}
|
||||
y++;
|
||||
if (x != size_x){
|
||||
printf("Invalid threshold file: wrong number of columns\n");
|
||||
syslog(LOG_ERR, "Invalid data file - wrong number of columns: %s" , fileName);
|
||||
ret = -2;
|
||||
break;
|
||||
}
|
||||
x = 0;
|
||||
}
|
||||
if (y != size_y){
|
||||
printf("Invalid threshold file: wrong number of rows\n");
|
||||
syslog(LOG_ERR, "Invalid data file - wrong number of rows: %s" , fileName);
|
||||
ret = -3;
|
||||
}
|
||||
fclose(file);
|
||||
return ret;
|
||||
}
|
||||
|
||||
double getParDouble(PyObject *pars, char *name, double defaultValue){
|
||||
PyObject* threshold_obj = PyDict_GetItemString(pars, name);
|
||||
if (threshold_obj!=NULL){
|
||||
if (PyFloat_Check(threshold_obj)) {
|
||||
return PyFloat_AsDouble(threshold_obj);
|
||||
} else if (PyLong_Check(threshold_obj)) {
|
||||
return PyLong_AsDouble(threshold_obj);
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
int initialize(int size_x, int size_y, PyObject *pars){
|
||||
openlog("single_photon", LOG_PID, LOG_USER);
|
||||
syslog(LOG_INFO, "Initialized single_photon.");
|
||||
int ret = 1;
|
||||
|
||||
threshold = (double *)malloc(size_x*size_y*sizeof(double));
|
||||
double threshold_val = getParDouble(pars, "threshold", 60000.0);
|
||||
PyObject* threshold_file = PyDict_GetItemString(pars, "threshold_file");
|
||||
if (threshold_file!=NULL){
|
||||
const char * threshold_file_str = PyUnicode_AsUTF8(threshold_file);
|
||||
int ret = parseTextFile(threshold_file_str, threshold, size_x, size_y);
|
||||
if (ret<0){
|
||||
free(threshold); threshold = NULL;
|
||||
setArrayToValue(threshold,size_x*size_y, threshold_val);
|
||||
}
|
||||
} else {
|
||||
PyObject* threshold_obj = PyDict_GetItemString(pars, "threshold");
|
||||
double threshold_val = 60000.0;
|
||||
if (threshold_obj!=NULL){
|
||||
if (PyFloat_Check(threshold_obj)) {
|
||||
threshold_val = PyFloat_AsDouble(threshold_obj);
|
||||
} else if (PyLong_Check(threshold_obj)) {
|
||||
threshold_val = PyLong_AsDouble(threshold_obj);
|
||||
}
|
||||
}
|
||||
for(int i=0; i<size_y;i++) {
|
||||
for(int j=0;j<size_x;j++) {
|
||||
threshold[i*size_x+j]=100.0;//threshold_val; #FIX ME
|
||||
}
|
||||
}
|
||||
setArrayToValue(threshold,size_x*size_y, threshold_val);
|
||||
}
|
||||
|
||||
|
||||
//background (all matrices are indexed in 1d)
|
||||
background = malloc(size_x*size_y*sizeof(double));
|
||||
double background_val = getParDouble(pars, "background", 0.0);
|
||||
PyObject* background_file = PyDict_GetItemString(pars, "background_file");
|
||||
if (background_file!=NULL){
|
||||
const char * background_file_str = PyUnicode_AsUTF8(background_file);
|
||||
int ret = parseTextFile(background_file_str, background, size_x, size_y);
|
||||
if (ret<0){
|
||||
setArrayToValue(background,size_x*size_y, background_val);
|
||||
}
|
||||
} else {
|
||||
setArrayToValue(background,size_x*size_y, background_val);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//def process_image(image, pulse_id, timestamp, x_axis, y_axis, parameters, bsdata=None):
|
||||
PyObject *process(PyObject *self, PyObject *args)
|
||||
{
|
||||
@@ -134,24 +150,19 @@ PyObject *process(PyObject *self, PyObject *args)
|
||||
if (initialized==0){
|
||||
initialized = initialize(size_x, size_y, pars);
|
||||
}
|
||||
|
||||
|
||||
int i,j,l;
|
||||
int i_dim=size_y;
|
||||
int j_dim=size_x;
|
||||
|
||||
|
||||
double *frameBKsub = malloc(i_dim*j_dim*sizeof(double));
|
||||
for(i=0; i<i_dim;i++) {
|
||||
for(j=0;j<j_dim;j++) {
|
||||
frameBKsub[i*j_dim+j]=(double)img_data[i*j_dim+j] - background[i*j_dim+j];
|
||||
}
|
||||
}
|
||||
|
||||
int evnt_num = func_ph_1d_double( frameBKsub, i_dim, j_dim, threshold);
|
||||
// int evnt_num = func_ph_1d_double( (double)img_data, i_dim, j_dim, threshold);
|
||||
|
||||
|
||||
//Create return dictionary
|
||||
PyObject *ret = PyDict_New();
|
||||
PyObject* camera_name = PyDict_GetItemString(pars, "camera_name");
|
||||
@@ -160,6 +171,9 @@ PyObject *process(PyObject *self, PyObject *args)
|
||||
//PyDict_SetItemString(ret, "camera_name", camera_name);
|
||||
sprintf(channel_name, "%s:%s",camera_name_str, CHANNEL_NAMES[0]);
|
||||
PyDict_SetItemString(ret, channel_name, PyLong_FromLong(evnt_num));
|
||||
|
||||
//PyDict_SetItemString(ret,"T0", PyFloat_FromDouble(threshold[0]));
|
||||
//PyDict_SetItemString(ret, "Init", PyLong_FromLong(initialized));
|
||||
for (int i=0; i<EVENT_CHANNELS; i++){
|
||||
sprintf(channel_name, "%s:%s",camera_name_str, CHANNEL_NAMES[i+1]);
|
||||
npy_intp arr_dims[1] = {MAX_NUM_EVENTS};
|
||||
@@ -210,7 +224,7 @@ PyObject *process(PyObject *self, PyObject *args)
|
||||
charge = frame[i*j_dim+j]+frame[(i+1)*j_dim+j] + frame[i*j_dim+(j+1)]+frame[(i+1)*j_dim+j+1];
|
||||
|
||||
//pixel by pixel threshold
|
||||
th = th_m[i*j_dim +j];
|
||||
th = 3*th_m[i*j_dim +j];
|
||||
|
||||
//check if charge above threshold
|
||||
if(charge>th) {
|
||||
@@ -271,13 +285,12 @@ PyObject *process(PyObject *self, PyObject *args)
|
||||
evt_i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return evt_i;
|
||||
//return th_m[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user