IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2011, 2:44:12 PM (15 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20110906
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110906

  • branches/eam_branches/ipp-20110906/ippMonitor

  • branches/eam_branches/ipp-20110906/ippMonitor/INSTALL

    r32186 r32630  
    1414
    1515# note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values:
    16 ipp@ippdb01 / ippdb01 example:
     16ipp@ippdb03 / ippdb03 example:
    1717 psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
    1818
  • branches/eam_branches/ipp-20110906/ippMonitor/czartool/czartool/CzarDb.pm

    r32093 r32630  
    682682            # added, and store value to subtract from linear value below. If > 1000
    683683            # processed per hour, then it must be wrong
    684             if (($thisProcessed - $lastProcessed)/($timeSep/3600) > 1000) {
     684            if (($thisProcessed - $lastProcessed)/(($timeSep/3600)+1) > 1000) {
    685685                $positiveJump = $thisProcessed - $lastProcessed;
    686686            }
     
    702702
    703703            # calculate first derivative in units of images per hour
    704             $derivPending = $diffPending/($timeSep/3600);
    705             $derivFaults = $diffFaults/($timeSep/3600);
    706             $derivProcessed = $diffProcessed/($timeSep/3600);
     704            $derivPending = $diffPending/($timeSep/3600 +1);
     705            $derivFaults = $diffFaults/($timeSep/3600 +1);
     706            $derivProcessed = $diffProcessed/($timeSep/3600 +1);
    707707
    708708        }
  • branches/eam_branches/ipp-20110906/ippMonitor/czartool/czartool/Gpc1Db.pm

    r32093 r32630  
    233233
    234234    }
     235    # 'new' stuff really includes 'update' stuff, at least for LAP. This is a hack, but there you go   
     236    elsif ($state eq "new") {
     237
     238        $query = $self->{_db}->prepare(<<SQL);
     239        SELECT COUNT(state) 
     240            FROM $table
     241            WHERE label LIKE '$label'
     242            AND (state = 'new' OR state = 'update')
     243SQL
     244    }
    235245    else {
    236246
  • branches/eam_branches/ipp-20110906/ippMonitor/def/chipProcessedImfile.d

    r27892 r32630  
    99WHERE chipProcessedImfile.chip_id = chipRun.chip_id
    1010WHERE chipProcessedImfile.fault = 0
     11
     12#UNRESTRICTED WHERE 0=1
    1113
    1214ARGS  ARG1 rawImfile.exp_id=$rawExp.exp_id
  • branches/eam_branches/ipp-20110906/ippMonitor/def/stackProcessedSkyfile_Images.d

    r27892 r32630  
    1818
    1919#        field                   size  format  name           show     link to         extras
    20 FIELD stackRun.stack_id,            5, %s,     Stack ID
     20FIELD stackRun.stack_id,            5, %d,     Stack ID
    2121FIELD stackRun.skycell_id,          5, %s,     Skycell ID
    2222FIELD stackRun.label,               5, %s,     Label
    2323FIELD stackRun.data_group,          5, %s,     data grp
    2424FIELD stackRun.dist_group,          5, %s,     dist grp
     25FIELD stackSumSkyfile.quality,      5, %d,     quality
    2526FIELD *,                            8, %s,     image,         image=JPEG2, stackProcessedSkyfile_Images.php,  ARG7
    2627FIELD stackRun.filter,              5, %s,     Filter
  • branches/eam_branches/ipp-20110906/ippMonitor/def/warpProcessedSkyfiles.d

    r27892 r32630  
    1 TABLE warpSkyfile, warpRun, fakeRun, camRun, chipRun, rawExp
     1TABLE rawExp JOIN chipRun USING(exp_id) JOIN camRun USING(chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) JOIN warpSkyfile USING(warp_id)
    22TITLE Warp Processed Skyfiles
    33FILE  warpProcessedSkyfiles.php
    44MENU  ipp.science.dat
    55
    6 WHERE warpSkyfile.warp_id = warpRun.warp_id
    7 WHERE warpRun.fake_id = fakeRun.fake_id
    8 WHERE fakeRun.cam_id = camRun.cam_id
    9 WHERE camRun.chip_id = chipRun.chip_id
    10 WHERE chipRun.exp_id = rawExp.exp_id
    11 WHERE warpSkyfile.fault = 0
     6UNRESTRICTED WHERE 0=1
    127
    138ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
  • branches/eam_branches/ipp-20110906/ippMonitor/def/warpProcessedSkyfiles_Images.d

    r27892 r32630  
    1 TABLE warpSkyfile, warpRun, fakeRun, camRun, chipRun, rawExp
     1TABLE  rawExp JOIN chipRun USING(exp_id) JOIN camRun USING(chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) JOIN warpSkyfile USING(warp_id)
    22TITLE Warp Processed Skyfiles
    33FILE  warpProcessedSkyfiles.php
    44MENU  ipp.science.dat
    55
    6 WHERE warpSkyfile.warp_id = warpRun.warp_id
    7 WHERE warpRun.fake_id = fakeRun.fake_id
    8 WHERE fakeRun.cam_id = camRun.cam_id
    9 WHERE camRun.chip_id = chipRun.chip_id
    10 WHERE chipRun.exp_id = rawExp.exp_id
    11 WHERE warpSkyfile.fault = 0
     6UNRESTRICTED WHERE 0=1
     7
     8# WHERE warpSkyfile.warp_id = warpRun.warp_id
     9# WHERE warpRun.fake_id = fakeRun.fake_id
     10# WHERE fakeRun.cam_id = camRun.cam_id
     11# WHERE camRun.chip_id = chipRun.chip_id
     12# WHERE chipRun.exp_id = rawExp.exp_id
     13# WHERE warpSkyfile.fault = 0
    1214
    1315# define image names to be used below
  • branches/eam_branches/ipp-20110906/ippMonitor/raw/czartool_labels.php

    r32226 r32630  
    158158echo "<tr><td>Documentation</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\"><font color=\"blue\">here</font></a></td></tr>";
    159159echo "<tr><td>Cluster load</td><td><a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&hc=6&c=IPP%2520Production\"><font color=\"blue\">here</font></a></td></tr>";
    160 echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ippdb01.ifa.hawaii.edu/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>";
     160echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ippmonitor.ipp.ifa.hawaii.edu/ippMonitor/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>";
    161161echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp0022.ifa.hawaii.edu/ps1sc/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>";
    162162echo "<tr><td>Czar log pages</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\"><font color=\"blue\">here</font></a></td></tr>";
     
    200200      echo "<tr>";
    201201      createTableColumnHeader("Database");
    202       createTableColumnHeader("Status");
     202      createTableColumnHeader("Status (sec behind master)");
    203203      showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1);
    204204      showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS);
     
    903903        //die("MySQL DB connection error: Check the configuration for $replDatabaseName");
    904904        //die("");
    905         return;
     905        return -1;
    906906
    907907    }
     
    910910        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
    911911        $errorStatusInMySql = $row[18];
    912         $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
     912        $sec_behind = $row[32];
     913        $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font color=\"red\">PROBLEM</font>");
    913914        echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
    914915        if ($errorStatusInMySql!=0) {
  • branches/eam_branches/ipp-20110906/ippMonitor/raw/warpProcessedExp.php

    r31876 r32630  
    117117// query the database
    118118if (basic == "basic") {
    119   $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,warpRun LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE LIMIT $dTABLE OFFSET $rowStart";
     119  $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 warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) JOIN warpSummary USING(warp_id) $WHERE LIMIT $dTABLE OFFSET $rowStart";
    120120}
    121121
  • branches/eam_branches/ipp-20110906/ippMonitor/raw/warpProcessedExp_Images.php

    r28718 r32630  
    7777
    7878if ($restricted == 0) {
    79   if ("none" != "none") {
    80     $WHERE = "$WHERE none";
    81   }
     79   $WHERE = "WHERE 0=1";
    8280}
    8381
    8482// get the result table count
    8583if (basic == "basic") {
    86   $sql = "SELECT count(*) FROM fakeRun,camRun,chipRun,rawExp,warpRun LEFT 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";
    8785}
    8886
     
    111109// query the database
    112110if (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,warpRun LEFT 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";
    114112}
    115113
     
    175173$buttonLink = button_restrict_string ('warpSummary.path_base', $buttonLink);
    176174$buttonLink = button_restrict_string ('warpSummary.projection_cell', $buttonLink);
     175$buttonLink = button_restrict_string ('warpRun.tess_id', $buttonLink);
    177176navigate_buttons ($rowStart, $rowLast, $dTABLE,
    178177                  $rowTotal, $buttonLink, $ID, 'warpProcessedExp_Images.php');
     
    210209write_header_cell ("list", "stdev    ");
    211210write_header_cell ("list", "Comment");
     211write_header_cell ("list", "TessId");
    212212echo "</tr>\n";
    213213echo "<tr><td></td>\n";
     
    236236write_sort_cell ("list", "rawExp.bg_stdev", $buttonLink, $ID, 'warpProcessedExp_Images.php');
    237237write_sort_cell ("list", "rawExp.comment", $buttonLink, $ID, 'warpProcessedExp_Images.php');
     238write_sort_cell ("list", "warpRun.tess_id", $buttonLink, $ID, 'warpProcessedExp_Images.php');
    238239echo "</tr>\n";
    239240// echo "</tr>\n";
     
    268269write_query_row ('rawExp.bg_stdev', 5, 'min');
    269270write_query_row ('rawExp.comment', 65, 'string');
     271write_query_row ('warpRun.tess_id', 65, 'string');
    270272echo "</tr><tr><td>&le;</td>\n";
    271273echo "<td> &nbsp; </td>\n";
     
    292294write_query_row ('rawExp.bg_stdev', 5, 'max');
    293295echo "<td> &nbsp; </td>\n";
     296echo "<td> &nbsp; </td>\n";
    294297echo "</tr>\n";
    295298// echo "</tr>\n";
     
    312315  //Identify current warpId
    313316  $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"; */
    316320
    317321  if (!isSet($warpIdCollection[$warpId])) {
    318 /*    echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */
     322    /* echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */
    319323    $warpIdCollection[$warpId] = array();
    320324    $skyCellValue = preg_replace("|skycell[.]|","",$row[23]);
    321325    $warpIdCollection[$warpId]["12"] = $skyCellValue;
    322 /*    echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */
     326    /* echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */
    323327
    324328    echo "<tr>\n";
     
    344348    echo "<td class=\"$class\">\n";
    345349    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"; */
    347351    echo "  <td class=\"ul3x2\" id=\"$warpId.00\"></td>\n";
    348352    echo "  <td class=\"uc3x2\" id=\"$warpId.01\">$noImageValue</td>\n";
    349353    echo "  <td class=\"ur3x2\" id=\"$warpId.02\">$noImageValue</td>\n";
    350354    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"; */
    352356    echo "  <td class=\"ll3x2\" id=\"$warpId.10\"></td>\n";
    353357    echo "  <td class=\"lc3x2\" id=\"$warpId.11\">$noImageValue</td>\n";
     
    364368    echo "<td class=\"$class\">\n";
    365369    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"; */
    367371    echo "  <td class=\"ul3x2\" id=\"t$warpId.00\"></td>\n";
    368372    echo "  <td class=\"uc3x2\" id=\"t$warpId.01\">No image</td>\n";
    369373    echo "  <td class=\"ur3x2\" id=\"t$warpId.02\">No image</td>\n";
    370374    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"; */
    372376    echo "  <td class=\"ll3x2\" id=\"t$warpId.10\"></td>\n";
    373377    echo "  <td class=\"lc3x2\" id=\"t$warpId.11\">No image</td>\n";
     
    376380    echo "</td>\n";
    377381
    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    }
    383396
    384397    //resume with "regular" columns
     
    399412    write_table_cell ($class, '%.2f', "", $row[20]);
    400413    write_table_cell ($class, '%s', "", $row[21]);
     414    write_table_cell ($class, '%s', "", $row[24]);
    401415    echo "</tr>\n";
    402416
     
    415429    $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>";
    416430
    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>";
    426436      } 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.01\", \"$cellContent\");</script>";
    436             echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$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>";
    437447          } 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>";
    441452            } 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          }
    448464        }
     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
    449504      }
    450505    }
Note: See TracChangeset for help on using the changeset viewer.