array( 'header' => "Authorization: Basic " . base64_encode("$username:$password"), "Connection: close\r\n" ) )); for ($id = 0; $id < sizeof($adeiChannel); $id++) { $adeiChannels = ""; for ($id2 = 0; $id2 < sizeof($adeiChannel[$id]); $id2++) { $adeiChannels = $adeiChannels . $adeiChannel[$id][$id2] . ","; } $adeiChannels = substr($adeiChannels, 0, strlen($adeiChannels) - 1); // adei address changed $fileip = file_get_contents("https://adei-katrin.kaas.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&rt=full&window=60,-1&format=csv", false, $context); // old adei //$fileip = file_get_contents("http://katrin.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=60&format=csv", false, $context); // backup server //$fileip = file_get_contents("http://ipekatrinbackupserv1.ipe.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=60&format=csv", false, $context); //echo $fileip . "
"; for ($id2 = sizeof($adeiChannel[$id]) - 1 ; $id2 > -1; $id2--) { $pos = strrpos($fileip, ","); $adeiValue[$id][$id2] = floatval(substr($fileip, $pos + 2)); $fileip = substr($fileip, 0, $pos); //echo $id . "," . $id2 . "," . $adeiValue[$id][$id2] . "
"; } } // corresponding KATRIN numbers of sensors $KatrinNumber = array( // DPS Magnets array(//0 "311-RBY-1-1051", "311-RBY-1-1052", "311-RBY-1-2051", "311-RBY-1-2052", "311-RBY-1-3051", "311-RBY-1-3052", "311-RBY-1-4051", "311-RBY-1-4052", "311-RBY-1-5051", "311-RBY-1-5052" ), // CPS Magnets array(//1 "320-RBI-1-1101", "320-RBI-1-1102", "320-RBI-1-2101", "320-RBI-1-2102", "320-RBI-1-3101", "320-RBI-1-3102", "320-RBI-1-4101", "320-RBI-1-4102", "320-RBI-1-5101", //"320-RBI-1-5102", // corrupted, not in ADEI anymore "320-RBI-1-6101", "320-RBI-1-6102", "320-RBI-1-7101", "320-RBI-1-7102" ), // LN2&LHe supply array(//2 "200-RLI-2-4119" // LN2 level ), array(//3 "200-RLI-2-1119" // LHe level ), array(//4 "200-RPI-2-4125" // LN2 pressure ), array(//5 "200-RPI-2-2144" // LHe pressure ), // DPS1-R beamtube temperature array(//6 "200-RTP-3-1101", "200-RTP-3-1102", "200-RTP-3-1103", "200-RTP-3-1104", "200-RTP-3-2101", "200-RTP-3-2102" ), array(//7 "200-RTP-3-3101", "200-RTP-3-3102", "200-RTP-3-3103", "200-RTP-3-3104", "200-RTP-3-6101", "200-RTP-3-6102" ), // Source beamtube temperature array(//8 "200-RTP-3-5101", "200-RTP-3-5102", "200-RTP-3-5107", "200-RTP-3-5108", //"200-RTP-3-5109", // extremely unstable //"200-RTP-3-5110", "200-RTP-3-5111", "200-RTP-3-5112", //"200-RTP-3-5113", //"200-RTP-3-5114", // shows 20 K //"200-RTP-3-5115", //"200-RTP-3-5116", "200-RTP-3-5117", "200-RTP-3-5118", "200-RTP-3-5123", "200-RTP-3-5124" ), // DPS1-F beamtube temperature array(//9 "200-RTP-3-4101", "200-RTP-3-4102", "200-RTP-3-7101", "200-RTP-3-7102", "200-RTP-3-7103", "200-RTP-3-7104" ), array(//10 "200-RTP-3-8101", "200-RTP-3-8102", "200-RTP-3-9101", "200-RTP-3-9102", "200-RTP-3-9103", "200-RTP-3-9104" ), // Isolation vacuum array(//11 "200-RPV-4-1110", "200-RPV-4-1160" ), // Magnet temperature array(//12 "200-RTT-1-5103", // M5 "200-RTT-1-4103", // M4 "200-RTT-1-1103", // M1 "200-RTT-1-2103", // M2 "200-RTT-1-3103", // M3 "200-RTT-1-7103", // M7 "200-RTT-1-6103" // M6 ), //Magnet currents array(//13 "200-REI-5-3111" // M5_M4_M1 ), array(//14 "200-REI-5-3211" // M2_M3 ), array(//15 "200-REI-5-3311" // M7_M6 ), // Inner shield (27 K) array(//16 "200-RTP-2-3122", "200-RTP-2-3121", "200-RTP-2-3124", "200-RTP-2-3123", "200-RTP-2-3129", "200-RTP-2-3130", "200-RTP-2-3125", "200-RTP-2-3126", "200-RTP-2-3131", "200-RTP-2-3132", "200-RTP-2-3133", "200-RTP-2-3134" ), // LN2 temperature array(//17 //"200-RTP-2-4130" // maybe wrong? "200-GRA-0-201-Min_Val" // told by M. Hackenjos ), // LHe temperature array(//18 "200-RTT-2-1114" ), // M5, M6 magnetic dipoles array(//19 "200-ELV-5-3410", // M5 dipole x "200-ELV-5-3420", // M5 dipole y ), array(//20 "200-ELV-5-3430", // M6 dipole x "200-ELV-5-3440", // M6 dipole y ), // temperature sensors on top of beamtube array(//21 "200-RTP-3-5102", // starting at front side "200-RTP-3-5106", // unstable --> stable now? (May 2, 2018) "200-RTP-3-5108", "200-RTP-3-5110", "200-RTP-3-5112", "200-RTP-3-5114", "200-RTP-3-5116", "200-RTP-3-5118", "200-RTP-3-5120", "200-RTP-3-5124" ), // temperature sensors on bottom of beamtube array(//22 "200-RTP-3-5101", // starting at front side "200-RTP-3-5105", // shows 20K, lost during cooldown --> came back? (May 2, 2018) "200-RTP-3-5107", // shows 20K, lost during cooldown --> came back? (May 2, 2018) "200-RTP-3-5109", // shows 100K "200-RTP-3-5111", "200-RTP-3-5113", "200-RTP-3-5115", "200-RTP-3-5117", "200-RTP-3-5119", "200-RTP-3-5123" ), // throughput array(//23 "610-RFY-8-0206" // 610-RFY-8-0206 ) ); ?>