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

Fix graphic

parent b92e7212
No related branches found
Tags 3.2.14
No related merge requests found
Pipeline #134880 passed
...@@ -33,56 +33,6 @@ ...@@ -33,56 +33,6 @@
} }
] ]
}, },
{
"title": "Cryogenic Distribution Line",
"width": 1,
"row": {
"1": 69,
"2": 45,
"3": 25,
"4": 33,
"5": 15,
"6": 15,
"7": 25,
"8": 25,
"9": 25,
"10": 25,
"11": 25,
"12": 25,
"13": 25
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 4,
"7": 1,
"8": 1,
"9": 1,
"10": 1,
"11": 1,
"12": 1,
"13": 1
},
"col_width": 3,
"widgets": [
{
"type": "flot_extended_plugin",
"settings": {
"plot_type": "None (Enable Points)",
"legend": true,
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbtemp = [];\n\nvar vb = 1;\nfor (let key in datasources[\"cryo\"]) {\n\tvbtemp.push([vb, datasources[\"cryo\"][key][\"value\"]]);\n vb = vb + 1;\n}\n\nvar data = [{label: \"Valve Box Temperature\", data: vbtemp, color: \"red\"}];\n\nreturn data;",
"xticks": "",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbdatay = [];\n\nfor (i = 0; i <= 300; i += 50) {\n\tvbdatay.push([i, i.toString()]);\n}\n\nvbdatay.push([350, \"T [K]\"]);\nreturn vbdatay;",
"points": true,
"zoom": "xy"
}
}
]
},
{ {
"title": "Permit table", "title": "Permit table",
"width": 1, "width": 1,
...@@ -237,7 +187,7 @@ ...@@ -237,7 +187,7 @@
"2": 2, "2": 2,
"3": 2, "3": 2,
"4": 2, "4": 2,
"5": 4, "5": 2,
"6": 2, "6": 2,
"7": 1, "7": 1,
"8": 1, "8": 1,
...@@ -286,94 +236,6 @@ ...@@ -286,94 +236,6 @@
} }
] ]
}, },
{
"title": "Beam Energy",
"width": 1,
"row": {
"1": 49,
"2": 15,
"3": 17,
"4": 15,
"5": 13,
"6": 7,
"9": 17,
"10": 17,
"11": 17,
"12": 17,
"14": 17,
"15": 17
},
"col": {
"1": 1,
"2": 1,
"3": 3,
"4": 3,
"5": 5,
"6": 4,
"9": 2,
"10": 2,
"11": 2,
"12": 2,
"14": 2,
"15": 2
},
"col_width": 1,
"widgets": [
{
"type": "text_widget",
"settings": {
"size": "regular",
"value": "switch(datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]) {\n case 0:\n return \"0 keV\";\n break;\n case 1:\n\t\treturn \"75 keV\";\n break;\n\tcase 2:\n\t\treturn String(datasources[\"general\"][\"PBI-FBPM01::Energy-R\"][\"value\"].toFixed(2))+\" MeV\";\n break;\n\tcase 3:\n\t\treturn \"21 MeV (Calc.)\";\n break;\n\tcase 4:\n\t\treturn \"DLT3 Energy\";\n break;\n default:\n return \"NO Energy reading\";\n}",
"animate": true
}
}
]
},
{
"title": "DTL Power",
"width": 1,
"row": {
"1": 57,
"2": 33,
"3": 37,
"4": 21,
"5": 27,
"6": 17,
"9": 19,
"10": 19,
"12": 19,
"14": 19,
"15": 19
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 1,
"9": 5,
"10": 5,
"12": 5,
"14": 5,
"15": 5
},
"col_width": 3,
"widgets": [
{
"type": "flot_extended_plugin",
"settings": {
"plot_type": "area",
"legend": true,
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"\";\nvar timelength = 0;\nvar pwdata = [];\nvar enable = 1;\nvar data = [];\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n if (datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2 > timelength) {\n timelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n }\n\n\tlet pwxdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n\tlet pwydata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n pwdata = [];\n \n let timestamp = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"timeStamp\"][\"secondsPastEpoch\"];\n\tlet now = Math.floor((new Date()).getTime() / 1000);\n\tif (now - timestamp > 120) {\n \tenable = 0;\n\t}\n\telse {\n \tenable = 1;\n\t}\n pwdata = [];\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n data.push({label: 'DTL '+module, data: pwdata});\n}\nreturn data;",
"xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar module = \"\";\nvar tmptimelength = 0;\nvar xdata = [];\nvar timelength = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n tmptimelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n\txdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n \n\tif (tmptimelength > xdata[xdata.length-1]) {\n \ttmptimelength = xdata[xdata.length-1];\n\t}\n if (tmptimelength > timelength) {\n timelength = tmptimelength;\n }\n}\n\n\nvar xtick = [];\nvar size = 10;\nif (cols == 1) {\n size = 4;\n}\n\nfor (i = 0; i < (size+1); i += 1) {\n xtick.push([timelength*i/size, (timelength*i/size).toFixed(3).toString()]);\n}\nxtick[size/2][1] = xtick[size/2][1]+\"<br>t [ms]\";\n\nreturn xtick;",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"1\";\nvar dtl_data = [];\nvar min_dtl = 100000;\nvar max_dtl = 0;\nvar tmp_min = 0;\nvar tmp_max = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString();\n\tdtl_data = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n\ttmp_min = Math.min(...dtl_data);\n tmp_max = Math.max(...dtl_data);\n if (tmp_min < min_dtl) {\n min_dtl = tmp_min;\n }\n if (tmp_max > max_dtl) {\n max_dtl = tmp_max;\n }\n}\n\nvar dtl_ticks = [];\n\nif (max_dtl-min_dtl < 1) {\n return([[-2,\"-2\"],[-1,\"-1\"],[0,\"0\"],[1,\"1\"],[2,\"P [kW]\"]]);\n}\n\nfor (i = min_dtl; i <= max_dtl; i += (max_dtl-min_dtl)/5) {\n\tdtl_ticks.push([i, Math.trunc(i)]);\n}\n\ndtl_ticks.push([max_dtl+(max_dtl-min_dtl)/5, \"P [kW]\"]);\nreturn dtl_ticks;\n",
"zoom": "xy"
}
}
]
},
{ {
"title": "ISrc Beam Current", "title": "ISrc Beam Current",
"width": 1, "width": 1,
...@@ -426,7 +288,7 @@ ...@@ -426,7 +288,7 @@
"2": 23, "2": 23,
"3": 7, "3": 7,
"4": 11, "4": 11,
"5": 17, "5": 7,
"6": 7, "6": 7,
"7": 13, "7": 13,
"8": 13, "8": 13,
...@@ -496,6 +358,49 @@ ...@@ -496,6 +358,49 @@
} }
] ]
}, },
{
"title": "Beam Energy",
"width": 1,
"row": {
"1": 49,
"2": 15,
"3": 17,
"4": 15,
"5": 13,
"6": 7,
"9": 17,
"10": 17,
"11": 17,
"12": 17,
"14": 17,
"15": 17
},
"col": {
"1": 1,
"2": 1,
"3": 3,
"4": 3,
"5": 5,
"6": 4,
"9": 2,
"10": 2,
"11": 2,
"12": 2,
"14": 2,
"15": 2
},
"col_width": 1,
"widgets": [
{
"type": "text_widget",
"settings": {
"size": "regular",
"value": "switch(datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]) {\n case 0:\n return \"0 keV\";\n break;\n case 1:\n\t\treturn \"75 keV\";\n break;\n\tcase 2:\n\t\treturn String(datasources[\"general\"][\"PBI-FBPM01::Energy-R\"][\"value\"].toFixed(2))+\" MeV\";\n break;\n\tcase 3:\n\t\treturn \"21 MeV (Calc.)\";\n break;\n\tcase 4:\n\t\treturn \"DLT3 Energy\";\n break;\n default:\n return \"NO Energy reading\";\n}",
"animate": true
}
}
]
},
{ {
"title": "Beam Mode", "title": "Beam Mode",
"width": 1, "width": 1,
...@@ -551,6 +456,101 @@ ...@@ -551,6 +456,101 @@
} }
} }
] ]
},
{
"title": "DTL Power",
"width": 1,
"row": {
"1": 57,
"2": 33,
"3": 37,
"4": 21,
"5": 29,
"6": 17,
"9": 19,
"10": 19,
"12": 19,
"14": 19,
"15": 19
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 1,
"9": 5,
"10": 5,
"12": 5,
"14": 5,
"15": 5
},
"col_width": 3,
"widgets": [
{
"type": "flot_extended_plugin",
"settings": {
"plot_type": "area",
"legend": true,
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"\";\nvar timelength = 0;\nvar pwdata = [];\nvar enable = 1;\nvar data = [];\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n if (datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2 > timelength) {\n timelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n }\n\n\tlet pwxdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n\tlet pwydata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n pwdata = [];\n \n let timestamp = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"timeStamp\"][\"secondsPastEpoch\"];\n\tlet now = Math.floor((new Date()).getTime() / 1000);\n\tif (now - timestamp > 120) {\n \tenable = 0;\n\t}\n\telse {\n \tenable = 1;\n\t}\n pwdata = [];\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n data.push({label: 'DTL '+module, data: pwdata});\n}\nreturn data;",
"xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar module = \"\";\nvar tmptimelength = 0;\nvar xdata = [];\nvar timelength = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n tmptimelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n\txdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n \n\tif (tmptimelength > xdata[xdata.length-1]) {\n \ttmptimelength = xdata[xdata.length-1];\n\t}\n if (tmptimelength > timelength) {\n timelength = tmptimelength;\n }\n}\n\n\nvar xtick = [];\nvar size = 10;\nif (cols == 1) {\n size = 4;\n}\n\nfor (i = 0; i < (size+1); i += 1) {\n xtick.push([timelength*i/size, (timelength*i/size).toFixed(3).toString()]);\n}\nxtick[size/2][1] = xtick[size/2][1]+\"<br>t [ms]\";\n\nreturn xtick;",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"1\";\nvar dtl_data = [];\nvar min_dtl = 100000;\nvar max_dtl = 0;\nvar tmp_min = 0;\nvar tmp_max = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString();\n\tdtl_data = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n\ttmp_min = Math.min(...dtl_data);\n tmp_max = Math.max(...dtl_data);\n if (tmp_min < min_dtl) {\n min_dtl = tmp_min;\n }\n if (tmp_max > max_dtl) {\n max_dtl = tmp_max;\n }\n}\n\nvar dtl_ticks = [];\n\nif (max_dtl-min_dtl < 1) {\n return([[-2,\"-2\"],[-1,\"-1\"],[0,\"0\"],[1,\"1\"],[2,\"P [kW]\"]]);\n}\n\nfor (i = min_dtl; i <= max_dtl; i += (max_dtl-min_dtl)/5) {\n\tdtl_ticks.push([i, Math.trunc(i)]);\n}\n\ndtl_ticks.push([max_dtl+(max_dtl-min_dtl)/5, \"P [kW]\"]);\nreturn dtl_ticks;\n",
"zoom": "xy"
}
}
]
},
{
"title": "Cryogenic Distribution Line",
"width": 1,
"row": {
"1": 69,
"2": 45,
"3": 25,
"4": 33,
"5": 17,
"6": 15,
"7": 25,
"8": 25,
"9": 25,
"10": 25,
"11": 25,
"12": 25,
"13": 25
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 4,
"7": 1,
"8": 1,
"9": 1,
"10": 1,
"11": 1,
"12": 1,
"13": 1
},
"col_width": 3,
"widgets": [
{
"type": "flot_extended_plugin",
"settings": {
"plot_type": "None (Enable Points)",
"legend": true,
"height": 5,
"value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbtemp = [];\n\nvar vb = 1;\nfor (let key in datasources[\"cryo\"]) {\n\tvbtemp.push([vb, datasources[\"cryo\"][key][\"value\"]]);\n vb = vb + 1;\n}\n\nvar data = [{label: \"Valve Box Temperature\", data: vbtemp, color: \"red\"}];\n\nreturn data;",
"xticks": "",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbdatay = [];\n\nfor (i = 0; i <= 300; i += 50) {\n\tvbdatay.push([i, i.toString()]);\n}\n\nvbdatay.push([350, \"T [K]\"]);\nreturn vbdatay;",
"points": true,
"zoom": "xy"
}
}
]
} }
], ],
"datasources": [ "datasources": [
......
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