IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42446 for trunk/tools


Ignore:
Timestamp:
Apr 10, 2023, 11:57:03 AM (3 years ago)
Author:
eugene
Message:

bug fixes, making iterations work

Location:
trunk/tools/eam/rawfix.20230221/src
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh

    r42445 r42446  
    2828  endif
    2929
    30   mysql $DBOPTS -e "select dateobs, state from nights"
     30  mysql $DBOPTS -e "select dateobs, iter, state from nights"
    3131  exit 0
    3232endif
     
    4949
    5050  set mynight = $2
    51   mysql $DBOPTS -e "select * from nights where (dateobs = '$mynight')"
     51  mysql -E $DBOPTS -e "select * from nights where (dateobs = '$mynight')"
    5252  exit 0
    5353endif
  • trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl

    r42445 r42446  
    7878
    7979        # determine the status of the instances
    80         my ($Nmain, $Nback, $Ndead) = &check_instance_xattr ($inforows, $ext_id, $data_st, $md5_sum);
    81 
    82         &check_instance_state ($outfh, $ext_id, $data_st, $md5_sum, $Nmain, $Nback, $Ndead);
     80        my ($Nmain, $Nback, $Nlost) = &check_instance_xattr ($inforows, $ext_id, $data_st, $md5_sum);
     81
     82        &check_instance_state ($outfh, $ext_id, $data_st, $md5_sum, $Nmain, $Nback, $Nlost);
    8383    }
    8484
     
    239239    my $Nmain = 0;
    240240    my $Nback = 0;
    241     my $Ndead = 0;
     241    my $Nlost = 0;
    242242
    243243    # xattr = 0 means instance @ ITC  (main)
     
    260260        my $xattr    = $values[3];
    261261       
    262         if ($xattr  > 1) { $Ndead ++; next; } # do not save instances on dead partitions
     262        if ($xattr  > 1) { $Nlost ++; next; } # do not save instances on dead partitions
    263263        if ($xattr == 0) { $Nmain ++; }
    264264        if ($xattr == 1) { $Nback ++; }
     
    277277    }
    278278
    279     return ($Nmain, $Nback, $Ndead);
     279    return ($Nmain, $Nback, $Nlost);
    280280}
    281281
     
    288288    my $Nmain = $_[4];
    289289    my $Nback = $_[5];
    290     my $Ndead = $_[6];
     290    my $Nlost = $_[6];
    291291
    292292    my $outinfo = "$extID $data_st $md5_sum";
     
    333333
    334334    # DEAD : no more valid instances
    335     if (($Nmain == 0) && ($Nback == 0) && $Ndead) {
     335    if (($Nmain == 0) && ($Nback == 0) && $Nlost) {
    336336        print $outfh "DEAD: $outinfo\n";
    337337        $Ndead ++;
     
    339339    }
    340340    # GONE : no more valid instances
    341     if (($Nmain == 0) && ($Nback == 0) && ($Ndead == 0)) {
     341    if (($Nmain == 0) && ($Nback == 0) && ($Nlost == 0)) {
    342342        print $outfh "GONE: $outinfo\n";
    343343        $Ngone ++;
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl

    r42445 r42446  
    4040my $Ncul2 = 0;
    4141my $Ncul3 = 0;
     42my $Nfail = 0;
    4243
    4344# load the lists of good and fail chips
     
    146147                close (OUTFILE);
    147148            }
    148             if ($goodMD5) { $Ndups++; } else { $Nfail ++; }
     149            ## if we know the MD5 is bad, add to Nfail, otherwise add to Ndups
     150            if ($haveMD5 && !$goodMD5) {
     151                $Nfail ++;
     152            } else {
     153                $Ndups++;
     154            }
    149155            next;
    150156        }
     
    162168                print OUTFILE "$newfile $datast $md5sum\n";
    163169                close (OUTFILE);
    164             }
    165             if ($goodMD5) { $Nxbck++; } else { $Nfail ++; }
     170            }
     171            ## if we know the MD5 is bad, add to Nfail, otherwise add to Nxbck:
     172            if ($haveMD5 && !$goodMD5) {
     173                $Nfail ++;
     174            } else {
     175                $Nxbck++;
     176            }
    166177            next;
    167178        }
     
    193204            }
    194205
    195             # these are done in stage 3:
    196             if ($goodMD5) {
     206            ## if we know the MD5 is bad, add to Nfail, otherwise add to NculX
     207            if ($haveMD5 && !$goodMD5) {
     208                $Nfail ++;
     209            } else {
    197210                if ($state eq "CUL1:") { $Ncul1++; next; }
    198211                if ($state eq "CUL2:") { $Ncul2++; next; }
    199212                if ($state eq "CUL3:") { $Ncul3++; next; }
    200             } else { $Nfail ++; }
     213            }
    201214        }
    202215    }
  • trunk/tools/eam/rawfix.20230221/src/rawfix.advance.pt

    r42441 r42446  
    1717  task.exec
    1818    #
    19     command advance.rawfix.sh all $MAX_ACTIVE_NIGHTS
     19    command advance.rawfix.pl --mode all --topdir $mypath --Nmax $MAX_ACTIVE_NIGHTS
    2020  end
    2121
  • trunk/tools/eam/rawfix.20230221/src/rawfix.pt

    r42445 r42446  
    2323# order is this file is not determinative, only the
    2424# change of state from STAGE1.new -> STAGE1.done -> STAGE2.new
    25 # input rawfix.advance.pt
     25input rawfix.advance.pt
    2626input rawfix.ckchip.pt
    2727input rawfix.fixchip.pt
  • trunk/tools/eam/rawfix.20230221/src/update.rawfix.sh

    r42400 r42446  
    22
    33if ($#argv < 1) then
    4   echo "USAGE: update.rawfix.sh (night) (state) [quality]"
     4  echo "USAGE: update.rawfix.sh (night) (state) [iter]"
    55  echo "   EG: update.rawfix.sh 20100501 new"
    66  exit 2
     
    99set mynight = $1
    1010set state   = $2
     11
     12set iter = ""
     13if ($#argv == 3) then
     14  set iter = ", iter = $3"
     15endif
    1116
    1217# make the rawfix database to track rawfix operations
     
    1823set DBOPTS = "-B --skip-column-names -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME"
    1924
    20 mysql $DBOPTS -e "update nights set state = '$state' where (dateobs = '$mynight')"
     25mysql $DBOPTS -e "update nights set state = '$state' $iter where (dateobs = '$mynight')"
    2126exit 0
Note: See TracChangeset for help on using the changeset viewer.