STS_main.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. // include helper functions
  3. include "STS_functions.php";
  4. // include channels
  5. include "STS_channels.php";
  6. $color = "#000000";
  7. // ########## SDS ##########
  8. placeTextWithWebsiteLink(-290, 1750, "SDS", 120, 30, $color, "SDS Status Overview", "https://status-sds.kaas.kit.edu/");
  9. $posYmagnetName = 75;
  10. $posYCompName = -150;
  11. // ########## Rearsection ##########
  12. placeText($posYCompName, 100, "Rear Section", 70, 30, $color);
  13. placeText($posYmagnetName, 240, "RSCM", 30, 5, $color);
  14. // ########## WGTS ##########
  15. //placeTextWithWebsiteLink($posYCompName, 670, "WGTS", 70, 30, $color, "WGTS Status Overview", "wgts");
  16. placeTextWithWebsiteLink($posYCompName, 670, "WGTS", 70, 30, $color, "WGTS Status Overview (BORA)", "wgts"
  17. "https://bora-wgts.kaas.kit.edu");
  18. placeText($posYmagnetName, 340, "M5", 30, 5, $color);
  19. placeText($posYmagnetName, 410, "M4", 30, 5, $color);
  20. placeText($posYmagnetName, 550, "M1", 30, 5, $color);
  21. placeText($posYmagnetName, 730, "M2", 30, 5, $color);
  22. placeText($posYmagnetName, 900, "M3", 30, 5, $color);
  23. placeText($posYmagnetName, 1040, "M7", 30, 5, $color);
  24. placeText($posYmagnetName, 1115, "M6", 30, 5, $color);
  25. // M5, M4, M1
  26. placePicOrig($posYmagnetName-15, 340+10, "VertDashed5.png", "M5, M4, M1 of WGTS share one current");
  27. placePicOrig($posYmagnetName-15, 410+10, "VertDashed5.png", "M5, M4, M1 of WGTS share one current");
  28. placePicOrig($posYmagnetName-15, 550+10, "VertDashed5.png", "M5, M4, M1 of WGTS share one current");
  29. placePicOrig($posYmagnetName-15, 350, "HorDashed20.png", "M5, M4, M1 of WGTS share one current");
  30. placePicOrig($posYmagnetName-15, 437, "HorDashed20.png", "M5, M4, M1 of WGTS share one current");
  31. placePicOrig($posYmagnetName-15, 520, "HorDashed10.png", "M5, M4, M1 of WGTS share one current");
  32. // M2, M3
  33. placePicOrig($posYmagnetName-15, 730+10, "VertDashed5.png", "M2, M3 of WGTS share one current");
  34. placePicOrig($posYmagnetName-15, 900+10, "VertDashed5.png", "M2, M3 of WGTS share one current");
  35. placePicOrig($posYmagnetName-15, 740, "HorDashed20.png", "M2, M3 of WGTS share one current");
  36. placePicOrig($posYmagnetName-15, 826, "HorDashed20.png", "M2, M3 of WGTS share one current");
  37. // M7, M6
  38. placePicOrig($posYmagnetName-15, 1040+10, "VertDashed5.png", "M7, M6 of WGTS share one current");
  39. placePicOrig($posYmagnetName-15, 1115+20, "VertDashed5.png", "M7, M6 of WGTS share one current");
  40. placePicOrig($posYmagnetName-15, 1050, "HorDashed20.png", "M7, M6 of WGTS share one current");
  41. for ($ii = 3; $ii <=5; $ii++)
  42. {
  43. if ($ii==3) {$posX=400; $Nl=9280;} else if ($ii==4) {$posX=765; $Nl=9289;} else if ($ii==5) {$posX=1030; $Nl=21852;}
  44. // Magnet currents
  45. placeTextWithLink($posYmagnetName-35, $posX, sprintf('%.1F', $adeiValue[$ii][0])." A", 60, 3, "#FF0000", $KatrinNumber[$ii][0], $adeiChannel[$ii][0]);
  46. $Bfield = 1.26e-6 * $adeiValue[$ii][0] * $Nl; // mu0 * I * N/l
  47. placeText($posYmagnetName-35, $posX+50, "<--> ".sprintf('%.1F', $Bfield)." T", 80, 3, "#FF0000");
  48. }
  49. /*placePicOrig(-15, 1580+50*($index-1), "VertDashed5.png", "all magnets of CPS share one current");
  50. placeText(0, 1570+50*($index-1), "M" . $index, 30, 5, $color);
  51. placePicOrig(-15, 1580, "HorDashed20.png", "all magnets of CPS share one current");
  52. placeTextWithLink(-35, 1650, sprintf('%.1F', $adeiValue[2][0])." A", 40, 3, "#FF0000", $KatrinNumber[2][0], $adeiChannel[2][0]);
  53. $NlCPS = 20550 / 0.9133;
  54. $BfieldCPS = 1.26e-6 * $adeiValue[2][0] * $NlCPS; // mu0 * I * N/l
  55. placeText(-35, 1690, "<--> ".sprintf('%.1F', $BfieldCPS)." T", 80, 3, "#FF0000");*/
  56. // ########## DPS ##########
  57. placeTextWithWebsiteLink($posYCompName, 1330, "DPS", 70, 30, $color, "DPS Status Overview (BORA)",
  58. "https://bora-dps.kaas.kit.edu");
  59. $thresDPS = 0.4; // magnet B in T
  60. $tol = 180; // hall sensor B in mT 55
  61. //$cali = array( 800, -800, 800, -800, 800, -800, 808, -769, 736, -778 );
  62. // calibration from M. Erhard
  63. //$cali = array( 760, -760, 760, -760, 760, -760, 808, -769, 736, -778 );
  64. // now measuring in T instead of mT
  65. //$cali = array( 0.760, -0.760, 0.760, -0.760, 0.760, -0.760, 0.808, -0.769, 0.736, -0.778 );
  66. for ($index = 1; $index <= 5; $index++)
  67. {
  68. $posX = 1220 + 70*($index-1);
  69. /*$link = $adeiChannel[0][0 + 2*($index-1)] . "," . $adeiChannel[0][1 + 2*($index-1)];
  70. $value = ( (5.5 * $adeiValue[0][2*($index-1)] / $cali[2*($index-1)]) + (5.5 * $adeiValue[0][1 + 2*($index-1)] / $cali[1 + 2*($index-1)]) ) / 2.0 ;
  71. $text = $KatrinNumber[0][0 + 2*($index-1)] . ", " . $KatrinNumber[0][1 + 2*($index-1)]; */
  72. $link = $adeiChannel[0][$index-1];
  73. $value = -1.26e-6 * $adeiValue[0][$index-1] * 36846.6/0.62811; // mu0 * I * N/l
  74. placeText($posYmagnetName, $posX, "M" . $index, 20, 5, $color);
  75. placeTextWithLink($posYmagnetName-35, $posX, sprintf('%.1F', $value)." T", 40, 3, "#FF0000", $text, $link);
  76. }
  77. // ########## CPS ##########
  78. //placeTextWithWebsiteLink($posYCompName, 1650, "CPS", 70, 30, $color, "CPS Status Overview", "http://ipepc57.ipe.kit.edu:8888/status");
  79. placeTextWithWebsiteLink($posYCompName, 1650, "CPS", 70, 30, $color, "CPS Status Overview (BORA)", "https://bora-cps.kaas.kit.edu");
  80. $thresCPS = 0.1; // threshold magnetic field in T
  81. for ($index = 1; $index <= 7; $index++)
  82. {
  83. //$pic = "coilA";
  84. $posX = 1570 + 50*($index-1);
  85. $posY = 230+3;
  86. $link = $adeiChannel[1][0 + 2*($index-1)] . "," . $adeiChannel[1][1 + 2*($index-1)];
  87. $value = ( $adeiValue[1][2*($index-1)] + $adeiChannel[1][1 + 2*($index-1)] ) /2.0 ;
  88. /*if (abs($value) > $thresCPS)
  89. {
  90. $posOffset = 0;
  91. if ($index == 2) $posOffset = 1;
  92. else if ($index == 4) $posOffset = -1;
  93. $text = "magnetic field [T] CPS magnet " . $index;
  94. placeTextWithLink($posY + 13, $posX - 5 + $posOffset, sprintf('%.1F', $value), 30, 2, "#FF0000", $text, $link);
  95. $pic = $pic . "On";
  96. $color = "#FF0000";
  97. }
  98. $text = "status CPS magnet " . $index . "&#10;red: ramped, white: off";
  99. placePicWithLink($posY, $posX, $pic . ".png", 20, $text, $link);*/
  100. // Current connection CPS
  101. placePicOrig(-15, 1580+50*($index-1), "VertDashed5.png", "all magnets of CPS share one current");
  102. placeText(0, 1570+50*($index-1), "M" . $index, 30, 5, $color);
  103. }
  104. placePicOrig(-15, 1580, "HorDashed20.png", "all magnets of CPS share one current");
  105. placePicOrig(-15, 1667, "HorDashed20.png", "all magnets of CPS share one current");
  106. placePicOrig(-15, 1754, "HorDashed20.png", "all magnets of CPS share one current");
  107. placePicOrig(-15, 1840, "HorDashed10.png", "all magnets of CPS share one current");
  108. placeTextWithLink(-35, 1640, sprintf('%.1F', $adeiValue[2][0])." A", 60, 3, "#FF0000", $KatrinNumber[2][0], $adeiChannel[2][0]);
  109. $NlCPS = 20550 / 0.9133;
  110. $BfieldCPS = 1.26e-6 * $adeiValue[2][0] * $NlCPS; // mu0 * I * N/l
  111. placeText(-35, 1690, "<--> ".sprintf('%.1F', $BfieldCPS)." T", 80, 3, "#FF0000");
  112. // throughput & column density
  113. $Q = ($adeiValue[6][0]+3.2 ) * 1.0;
  114. $Qtext = sprintf('%.1f', $Q)." sccm";
  115. placeTextWithLink(-50, 680, "q = ".$Qtext, 150, 4, $color, $KatrinNumber[23][0], $adeiChannel[23][0]);
  116. $Q1 = $Q * 0.01689189;
  117. $Q1text = sprintf('%.1f', $Q1)." mbar l/s";
  118. placeText(-25, 680, "q = ".$Q1text, 150, 4, $color);
  119. $Ntext = sprintf('%.1e', GetColDens($Q1))." 1/m^2";
  120. placeText(0, 680, "N = ".$Ntext, 150, 4, $color);
  121. ?>