Changeset 32366
- Timestamp:
- Sep 7, 2011, 9:42:54 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/warpProcessedExp_Images.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/warpProcessedExp_Images.php
r28718 r32366 77 77 78 78 if ($restricted == 0) { 79 if ("none" != "none") { 80 $WHERE = "$WHERE none"; 81 } 79 $WHERE = "WHERE 0=1"; 82 80 } 83 81 84 82 // get the result table count 85 83 if (basic == "basic") { 86 $sql = "SELECT count(*) FROM fakeRun,camRun,chipRun,rawExp,warpRunLEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE";84 $sql = "SELECT count(*) FROM rawExp JOIN chipRun USING(exp_id) JOIN camRun USING (chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE"; 87 85 } 88 86 … … 111 109 // query the database 112 110 if (basic == "basic") { 113 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage') FROM fakeRun,camRun,chipRun,rawExp,warpRunLEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE LIMIT $dTABLE OFFSET $rowStart";111 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage'),warpRun.tess_id FROM rawExp JOIN chipRun USING(exp_id) JOIN camRun USING (chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE LIMIT $dTABLE OFFSET $rowStart"; 114 112 } 115 113 … … 175 173 $buttonLink = button_restrict_string ('warpSummary.path_base', $buttonLink); 176 174 $buttonLink = button_restrict_string ('warpSummary.projection_cell', $buttonLink); 175 $buttonLink = button_restrict_string ('warpRun.tess_id', $buttonLink); 177 176 navigate_buttons ($rowStart, $rowLast, $dTABLE, 178 177 $rowTotal, $buttonLink, $ID, 'warpProcessedExp_Images.php'); … … 210 209 write_header_cell ("list", "stdev "); 211 210 write_header_cell ("list", "Comment"); 211 write_header_cell ("list", "TessId"); 212 212 echo "</tr>\n"; 213 213 echo "<tr><td></td>\n"; … … 236 236 write_sort_cell ("list", "rawExp.bg_stdev", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 237 237 write_sort_cell ("list", "rawExp.comment", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 238 write_sort_cell ("list", "warpRun.tess_id", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 238 239 echo "</tr>\n"; 239 240 // echo "</tr>\n"; … … 268 269 write_query_row ('rawExp.bg_stdev', 5, 'min'); 269 270 write_query_row ('rawExp.comment', 65, 'string'); 271 write_query_row ('warpRun.tess_id', 65, 'string'); 270 272 echo "</tr><tr><td>≤</td>\n"; 271 273 echo "<td> </td>\n"; … … 292 294 write_query_row ('rawExp.bg_stdev', 5, 'max'); 293 295 echo "<td> </td>\n"; 296 echo "<td> </td>\n"; 294 297 echo "</tr>\n"; 295 298 // echo "</tr>\n"; … … 312 315 //Identify current warpId 313 316 $warpId = $row[5]; 314 /* echo "<tr><td>Number of elements in warpIdCollection: ".count($warpIdCollection)."</td></tr>\n"; */ 315 /* echo "<tr><td>(warpId=$warpId)</td></tr>\n"; */ 317 $tessId = $row[24]; 318 /* echo "<tr><td>Number of elements in warpIdCollection: ".count($warpIdCollection)."</td></tr>\n"; */ 319 /* echo "<tr><td>(warpId=$warpId)</td></tr>\n"; */ 316 320 317 321 if (!isSet($warpIdCollection[$warpId])) { 318 /*echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */322 /* echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */ 319 323 $warpIdCollection[$warpId] = array(); 320 324 $skyCellValue = preg_replace("|skycell[.]|","",$row[23]); 321 325 $warpIdCollection[$warpId]["12"] = $skyCellValue; 322 /*echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */326 /* echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */ 323 327 324 328 echo "<tr>\n"; … … 344 348 echo "<td class=\"$class\">\n"; 345 349 echo "<table border=\"1\"><tr>\n"; 346 /*echo " <td class=\"ul3x2\" id=\"$warpId.00\">$noImageValue</td>\n"; */350 /* echo " <td class=\"ul3x2\" id=\"$warpId.00\">$noImageValue</td>\n"; */ 347 351 echo " <td class=\"ul3x2\" id=\"$warpId.00\"></td>\n"; 348 352 echo " <td class=\"uc3x2\" id=\"$warpId.01\">$noImageValue</td>\n"; 349 353 echo " <td class=\"ur3x2\" id=\"$warpId.02\">$noImageValue</td>\n"; 350 354 echo "</tr><tr>\n"; 351 /*echo " <td class=\"ll3x2\" id=\"$warpId.10\">$noImageValue</td>\n"; */355 /* echo " <td class=\"ll3x2\" id=\"$warpId.10\">$noImageValue</td>\n"; */ 352 356 echo " <td class=\"ll3x2\" id=\"$warpId.10\"></td>\n"; 353 357 echo " <td class=\"lc3x2\" id=\"$warpId.11\">$noImageValue</td>\n"; … … 364 368 echo "<td class=\"$class\">\n"; 365 369 echo "<table border=\"1\"><tr>\n"; 366 /*echo " <td class=\"ul3x2\" id=\"t$warpId.00\">No image</td>\n"; */370 /* echo " <td class=\"ul3x2\" id=\"t$warpId.00\">No image</td>\n"; */ 367 371 echo " <td class=\"ul3x2\" id=\"t$warpId.00\"></td>\n"; 368 372 echo " <td class=\"uc3x2\" id=\"t$warpId.01\">No image</td>\n"; 369 373 echo " <td class=\"ur3x2\" id=\"t$warpId.02\">No image</td>\n"; 370 374 echo "</tr><tr>\n"; 371 /*echo " <td class=\"ll3x2\" id=\"t$warpId.10\">No image</td>\n"; */375 /* echo " <td class=\"ll3x2\" id=\"t$warpId.10\">No image</td>\n"; */ 372 376 echo " <td class=\"ll3x2\" id=\"t$warpId.10\"></td>\n"; 373 377 echo " <td class=\"lc3x2\" id=\"t$warpId.11\">No image</td>\n"; … … 376 380 echo "</td>\n"; 377 381 378 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 379 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 380 $imageNameValue = ($row[23]=="noimage" ? 381 "No image" : $row[23]); 382 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$imageNameValue\");</script>"; 382 if ($tessId != "RINGS.V3") { 383 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 384 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 385 $imageNameValue = ($row[23]=="noimage" ? 386 "No image" : $row[23]); 387 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$imageNameValue\");</script>"; 388 } else { 389 //The cell to update is the upper right one for new tessellation 390 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 391 echo "<script type=\"text/javascript\">changeCell(\"$warpId.02\", \"$cellContent\");</script>"; 392 $imageNameValue = ($row[23]=="noimage" ? 393 "No image" : $row[23]); 394 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$imageNameValue\");</script>"; 395 } 383 396 384 397 //resume with "regular" columns … … 399 412 write_table_cell ($class, '%.2f', "", $row[20]); 400 413 write_table_cell ($class, '%s', "", $row[21]); 414 write_table_cell ($class, '%s', "", $row[24]); 401 415 echo "</tr>\n"; 402 416 … … 415 429 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 416 430 417 if ($skyCellValue == $lrValue + 1) { 418 $warpIdCollection[$warpId]["11"] = $skyCellValue; 419 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 420 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 421 } else { 422 if ($skyCellValue == $lrValue + 2) { 423 $warpIdCollection[$warpId]["10"] = $skyCellValue; 424 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 425 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 431 if ($tessId != "RINGS.V3") { 432 if ($skyCellValue == $lrValue + 1) { 433 $warpIdCollection[$warpId]["11"] = $skyCellValue; 434 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 435 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 426 436 } else { 427 if (!isSet($warpIdCollection[$warpId]["02"])) {428 /* echo "<tr><td>Update UpperRight</td></tr>"; */429 $warpIdCollection[$warpId]["02"] = $skyCellValue;430 echo "<script type=\"text/javascript\">changeCell(\" $warpId.02\", \"$cellContent\");</script>";431 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$row[23]\");</script>"; 432 } else{433 $urValue = $warpIdCollection[$warpId]["02"];434 if ($urValue + 1 == $skyCellValue) {435 echo "<script type=\"text/javascript\">changeCell(\"$warpId.0 1\", \"$cellContent\");</script>";436 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.0 1\", \"$row[23]\");</script>";437 if ($skyCellValue == $lrValue + 2) { 438 $warpIdCollection[$warpId]["10"] = $skyCellValue; 439 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 440 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 441 } else { 442 if (!isSet($warpIdCollection[$warpId]["02"])) { 443 /* echo "<tr><td>Update UpperRight</td></tr>"; */ 444 $warpIdCollection[$warpId]["02"] = $skyCellValue; 445 echo "<script type=\"text/javascript\">changeCell(\"$warpId.02\", \"$cellContent\");</script>"; 446 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$row[23]\");</script>"; 437 447 } else { 438 if ($urValue + 2 == $skyCellValue) { 439 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 440 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 448 $urValue = $warpIdCollection[$warpId]["02"]; 449 if ($urValue + 1 == $skyCellValue) { 450 echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>"; 451 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>"; 441 452 } else { 442 $expected = $urValue + 1; 443 $actual = $skyCellValue; 444 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 445 echo "<tr><td>Problem in Upper part!</td></tr>"; 446 } 447 } 453 if ($urValue + 2 == $skyCellValue) { 454 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 455 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 456 } else { 457 $expected = $urValue + 1; 458 $actual = $skyCellValue; 459 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 460 echo "<tr><td>Problem in Upper part!</td></tr>"; 461 } 462 } 463 } 448 464 } 465 } 466 } else { /* New tessellation */ 467 468 /* echo "<p>$lrValue - $skyCellValue</p>"; */ 469 470 if ($skyCellValue == $lrValue + 1) { 471 $warpIdCollection[$warpId]["11"] = $skyCellValue; 472 echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>"; 473 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>"; 474 } else { 475 if ($skyCellValue == $lrValue + 2) { 476 $warpIdCollection[$warpId]["10"] = $skyCellValue; 477 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 478 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 479 } else { 480 if (!isSet($warpIdCollection[$warpId]["02"])) { 481 /* echo "<tr><td>Update UpperRight</td></tr>"; */ 482 $warpIdCollection[$warpId]["02"] = $skyCellValue; 483 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 484 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$row[23]\");</script>"; 485 } else { 486 $urValue = $warpIdCollection[$warpId]["02"]; 487 if ($urValue + 1 == $skyCellValue) { 488 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 489 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 490 } else { 491 if ($urValue + 2 == $skyCellValue) { 492 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 493 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 494 } else { 495 $expected = $urValue + 1; 496 $actual = $skyCellValue; 497 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 498 echo "<tr><td>Problem in Upper part!</td></tr>"; 499 } 500 } 501 } 502 } 503 449 504 } 450 505 }
Note:
See TracChangeset
for help on using the changeset viewer.
