Skip to content
Snippets Groups Projects
Commit c8e67adc authored by Emanuele Laface's avatar Emanuele Laface
Browse files

Fix

parent dca7121a
No related branches found
No related tags found
No related merge requests found
Pipeline #101724 passed
......@@ -513,7 +513,7 @@
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nswitch(datasources[\"POS\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"]) {\n case 0:\n return \"ISrc\";\n break;\n case 1:\n\t\tlebtydata = datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"];\n rfqydata = datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"];\n mebt1ydata = datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"];\n mebt2ydata = datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"];\n fclebtydata = datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"];\n fcmebtydata = datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"];\n startroi = 1000;\n\t\tendroi = 9000;\n break;\n\tcase 2:\n lebtydata = datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"];\n rfqydata = datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"];\n mebt1ydata = datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"];\n mebt2ydata = datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"];\n fclebtydata = datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"];\n fcmebtydata = datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"];\n startroi = 6500;\n\t\tendroi = 6700;\n break;\n\tcase 3:\n\t\treturn \"DTL2\";\n break;\n\tcase 4:\n\t\treturn \"DLT3\";\n break;\n default:\n return \"NO Destination\";\n}\n\nlebtdata = [];\nrfqdata = [];\nmebt1data = [];\nmebt2data = [];\nfclebtdata = [];\nfcmebtdata = [];\n\n\n\nfor (i=0; i < lebtydata.length; i++) {\n\tlebtdata.push([((endroi-startroi)/lebtydata.length*i+startroi)/1000, lebtydata[i]]);\n}\n\nfor (i=0; i < rfqydata.length; i++) {\n\trfqdata.push([((endroi-startroi)/rfqydata.length*i+startroi)/1000, rfqydata[i]]);\n}\n\nfor (i=0; i < mebt1ydata.length; i++) {\n\tmebt1data.push([((endroi-startroi)/mebt1ydata.length*i+startroi)/1000, mebt1ydata[i]]);\n}\n\nfor (i=0; i < mebt2ydata.length; i++) {\n\tmebt2data.push([((endroi-startroi)/mebt2ydata.length*i+startroi)/1000, mebt2ydata[i]]);\n}\n\nfor (i=0; i < fclebtydata.length; i++) {\n\tfclebtdata.push([((endroi-startroi)/fclebtydata.length*i+startroi)/1000, fclebtydata[i]]);\n}\n\nfor (i=0; i < fcmebtydata.length; i++) {\n\tfcmebtdata.push([((endroi-startroi)/fcmebtydata.length*i+startroi)/1000, fcmebtydata[i]]);\n}\n\ndata = [{label: 'BCM LEBT', data: lebtdata, color: \"red\"},\n {label: 'BCM RFQ', data: rfqdata, color: \"green\"},\n {label: 'BCM MEBT 1', data: mebt1data, color: \"pink\"},\n {label: 'BCM MEBT 2', data: mebt2data, color: \"black\"},\n {label: 'FC LEBT', data: fclebtdata, color: \"lime\"},\n {label: 'FC MEBT', data: fcmebtdata, color: \"yellow\"}];\n\nreturn data;",
"xticks": "",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nif (typeof axes === 'undefined') {\n return;\n}\n\nytick = [];\n\nmax_val = 0;\n\nswitch(datasources[\"POS\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"]) {\n case 0:\n return \"ISrc\";\n break;\n case 1:\n max_val = Math.max(Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"]));\n break;\n\tcase 2:\n max_val = Math.max(Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"]));\n break;\n\tcase 3:\n\t\treturn \"DTL2\";\n break;\n\tcase 4:\n\t\treturn \"DLT3\";\n break;\n default:\n return \"NO Destination\";\n}\n\n\nif (max_val == 0) {\n\tmax_val = 10;\n}\n\nstep = max_val/10;\n\nfor (i=0; i<max_val; i+=step) {\n ytick.push([i,String(i.toFixed(1))]);\n}\n\nytick.push([max_val+step,\"I [mA]\"]);\n\n\nreturn ytick;",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nif (typeof axes === 'undefined') {\n return;\n}\n\nytick = [];\n\nmax_val = 0;\n\nswitch(datasources[\"POS\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"]) {\n case 0: // ISrc\n return;\n break;\n case 1:\n max_val = Math.max(Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[5503:200:49530]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000]\"][\"value\"]));\n break;\n\tcase 2:\n max_val = Math.max(Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[35772:4:36872]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"]),\n Math.max.apply(Math, datasources[\"POS\"][\"MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700]\"][\"value\"]));\n break;\n\tcase 3: // DTL1\n\t\treturn;\n break;\n\tcase 4: // DTL2\n\t\treturn;\n break;\n default:\n return;\n}\n\n\nif (max_val < 0.3) {\n for (i=-0.2; i<0.2; i+=0.05) {\n ytick.push([i,String(i.toFixed(2))]);\n }\n ytick.push([0.2,\"I [mA]\"]);\n}\nelse {\n step = max_val/10;\n for (i=0; i<max_val; i+=step) {\n ytick.push([i,String(i.toFixed(1))]);\n }\n ytick.push([max_val+step,\"I [mA]\"]);\n}\n\n\n\n\nreturn ytick;",
"zoom": "xy"
}
}
......@@ -554,7 +554,7 @@
"plot_type": "line",
"legend": true,
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nxbpm = [];\nybpm = [];\n\nbpmpositions = [0.400, 0.762, 2.224, 2.424, 2.624, 3.436, 3.636, 3.836];\n\nfor (i=1; i < 9; i++) {\n xpv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"POS\"][xpv][\"value\"]/1000;\n if (xvalue == null) {\n xvalue = 0.0;\n }\n xbpm.push([bpmpositions[i-1], xvalue]);\n ypv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"POS\"][ypv][\"value\"]/1000;\n if (yvalue == null) {\n yvalue = 0.0;\n }\n ybpm.push([bpmpositions[i-1], yvalue]);\n}\n\ndata = [{label: 'Horizontal', data: xbpm, color: \"lime\"},\n {label: 'Vertical', data: ybpm, color: \"yellow\"}];\n\nreturn data;",
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nxbpm = [];\nybpm = [];\n\nbpmpositions = [0.400, 0.762, 2.224, 2.424, 2.624, 3.436, 3.636, 3.836];\n\nif (datasources[\"POS\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"] != 2) { // MEBT\n for (i=1; i < 9; i++) {\n xbpm.push([bpmpositions[i-1], 0]);\n ybpm.push([bpmpositions[i-1], 0]);\n }\n\tdata = [{label: 'Horizontal', data: xbpm, color: \"lime\"},\n {label: 'Vertical', data: ybpm, color: \"yellow\"}];\n return data;\n}\n\nfor (i=1; i < 9; i++) {\n xpv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"POS\"][xpv][\"value\"]/1000;\n if (xvalue == null) {\n xvalue = 0.0;\n }\n xbpm.push([bpmpositions[i-1], xvalue]);\n ypv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"POS\"][ypv][\"value\"]/1000;\n if (yvalue == null) {\n yvalue = 0.0;\n }\n ybpm.push([bpmpositions[i-1], yvalue]);\n}\n\ndata = [{label: 'Horizontal', data: xbpm, color: \"lime\"},\n {label: 'Vertical', data: ybpm, color: \"yellow\"}];\n\nreturn data;",
"xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\ndigits = 3;\nbpmxlabel = \"<br>BPM Position from MEBT start [m]\";\n\nif (cols == 2) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 1;\n}\nif (cols == 1) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 0;\n}\n\n\nbpmxtick = [];\n\nbpmpositions = [0.400, 0.762, 2.224, 2.424, 2.624, 3.436, 3.636, 3.836];\n\nfor (i = 0; i < 8; i += 1) {\n\tbpmxtick.push([bpmpositions[i], String(bpmpositions[i].toFixed(digits))]);\n}\nbpmxtick[2][1] += bpmxlabel;\n\nreturn bpmxtick;",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nytick = [];\n\nfor (i = -4; i < 4; i += 1) {\n\tytick.push([i, String(i)]);\n}\n\nytick.push([4, \"∆X,∆Y [mm]\"]);\n\nreturn ytick;",
"points": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment