IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 10, 2013, 2:14:21 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130904
Files:
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904

  • branches/eam_branches/ipp-20130904/ippScripts/scripts/chip_imfile.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/destreak_restore_camera.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/ipp_apply_burntool_single.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/lap_science.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/magic_destreak.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/publish_file.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/rawcheck.pl

    r36253 r36370  
    8181my $regtool_cmd = "$regtool -processedimfile -exp_id $exp_id -dbname $dbname";
    8282my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    83     run(command => $regtool_cmd, verbose => 1);
     83    run(command => $regtool_cmd, verbose => 0);
    8484unless ($success) {
    8585    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    133133            $existance[$i] = 1;
    134134            $existing_copies++;
    135             my $fh;
    136             open($fh,$files[$i]);
    137             $md5sums[$i] = Digest::MD5->new->addfile($fh)->hexdigest;
     135            $md5sums[$i] = local_md5sum($files[$i]);
     136#           my $fh;
     137#           open($fh,$files[$i]);
     138#           $md5sums[$i] = Digest::MD5->new->addfile($fh)->hexdigest;
     139#           close($fh);
    138140            $md5sum_uniq{$md5sums[$i]} = 1;
    139             close($fh);
     141
    140142        }
    141143        else {
     
    223225# Begin my best validation thought
    224226        {
    225             my $fh;
    226             open($fh,$files[0]);
    227             my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
    228             close($fh);
     227            my $tmpmd5 = local_md5sum($files[0]);
     228#           my $fh;
     229#           open($fh,$files[0]);
     230#           my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
     231#           close($fh);
    229232            if ($tmpmd5 ne $md5sum) {
    230233                die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
     
    257260                my $uris = $neb->find_instances($key,$rep_vol);
    258261                @$uris = map {URI->new($_)->file if $_} @$uris;
    259                 my $fh;
    260                 open($fh,${ $uris }[0]);
    261                 my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
    262                 close($fh);
     262                my $tmpmd5 = local_md5sum(${ $uris }[0]);
     263#               my $fh;
     264#               open($fh,${ $uris }[0]);
     265#               my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
     266#               close($fh);
    263267                if ($tmpmd5 ne $md5sum) {
    264268                    die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
     
    282286
    283287#               print $uris . " " . ${ $uris }[0] . " \n";
    284                 my $fh;
    285                 open($fh,${ $uris }[0]);
    286 
    287                 my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
    288                 close($fh);
     288                my $tmpmd5 = local_md5sum(${ $uris }[0]);
     289#               my $fh;
     290#               open($fh,${ $uris }[0]);
     291#               my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
     292#               close($fh);
    289293                if ($tmpmd5 ne $md5sum) {
    290294                    die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
     
    318322}
    319323
     324sub local_md5sum {
     325    my $filename = shift;
     326    my $volume   = (split /\//, $filename)[2];
     327    my $host     = $volume;
     328    $host =~ s/\.\d//;
     329#    print "$filename $host $volume\n";
     330    my $response = `ssh $host md5sum $filename`;
     331    chomp($response);
     332    my ($sum, undef) = split /\s+/, $response;
     333    unless(defined($sum)) {
     334        my_die("Failed to calculate md5sum locally. $filename $host $volume");
     335    }
     336    return($sum);
     337}
     338
     339
    320340sub parse_volume {
    321341    my $filename = shift(@_);
     
    341361}
    342362
    343        
    344 
    345 
    346363sub my_die {
    347364    my $msg = shift(@_);
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/skycell_jpeg.pl

    r35853 r36370  
    271271
    272272    my %products = ('image' => "PPSTACK.UNCONV",
    273                     'mask'  => "PPSTACK.UNCONV.MASK",
     273#                   'mask'  => "PPSTACK.UNCONV.MASK",
    274274                    'variance' => "PPSTACK.UNCONV.VARIANCE",
    275275                    'exp'   => "PPSTACK.UNCONV.EXP",
     
    327327                $command .= " -Di BIN1 1 -Di BIN2 1 ";
    328328            }
    329 #           elsif ($key eq 'image') {
    330 #               $command .= " -masks $tangents{$projection_cell}{mask}{NAME} ";
    331 #           }
    332 #           elsif ($key eq 'mask') {
    333 #               next; # This should be made with the images.
    334 #           }
    335             else {
    336                 # Append the image list to other objects, in case the WCS information is unpopulated
    337                 $command .= " -wcsref $tangents{$projection_cell}{image}{NAME} ";
    338             }
     329            elsif ($key eq 'image') {
     330                $command .= " -exptimeOrder 1 ";
     331            }
     332            elsif ($key eq 'variance') {
     333                $command .= " -exptimeOrder 2 ";
     334            }
     335            # Append the image list to other objects, in case the WCS information is unpopulated
     336            $command .= " -wcsref $tangents{$projection_cell}{image}{NAME} ";
     337
    339338            if ($tangents{$projection_cell}{$key}{N} > 0) {
    340339                print "$command\n";
  • branches/eam_branches/ipp-20130904/ippScripts/scripts/warp_skycell.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/share

  • branches/eam_branches/ipp-20130904/ippTools/share/Makefile.am

    r36041 r36370  
    400400        stacktool_tosummary.sql \
    401401        stacktool_addsummary.sql \
     402        stacktool_revertsummary.sql \
    402403        stacktool_summary.sql \
    403404        staticskytool_definebyquery_select.sql \
  • branches/eam_branches/ipp-20130904/ippTools/share/camtool_find_pendingimfile.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/share/chiptool_setimfiletoupdate.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/share/pxadmin_create_tables.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/share/stacktool_addsummary.sql

    r28375 r36370  
    11INSERT INTO stackSummary (sass_id,projection_cell,path_base) VALUES (
    2        %lld,   -- warp_id
     2       %lld,   -- sass_id
    33       '%s',   -- projection_cell
    44       '%s'    -- path_base
  • branches/eam_branches/ipp-20130904/ippTools/share/warptool_towarped.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/src

  • branches/eam_branches/ipp-20130904/ippTools/src/camtool.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/src/camtoolConfig.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/src/magictool.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippTools/src/regtoolConfig.c

    r32593 r36370  
    292292    psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-state",         0,            "search by exposure state", NULL);
    293293    psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-exp_tag",       0,            "search by exp_tag", NULL);
    294     psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-exp_type",      0,            "search by exp_type", "object");
     294    psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-exp_type",      0,            "search by exp_type", NULL);
    295295    psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-filelevel",     0,            "search by filelevel", NULL);
    296296    psMetadataAddStr(processedexpArgs,  PS_LIST_TAIL, "-reduction",     0,            "search by reduction class", NULL);
  • branches/eam_branches/ipp-20130904/ippTools/src/stacktool.c

    r36009 r36370  
    4444static bool tosummaryMode(pxConfig *config);
    4545static bool addsummaryMode(pxConfig *config);
     46static bool revertsummaryMode(pxConfig *config);
    4647static bool summaryMode(pxConfig *config);
    4748static bool pendingcleanuprunMode(pxConfig *config);
     
    8586        MODECASE(STACKTOOL_MODE_TOSUMMARY,             tosummaryMode);
    8687        MODECASE(STACKTOOL_MODE_ADDSUMMARY,            addsummaryMode);
     88        MODECASE(STACKTOOL_MODE_REVERTSUMMARY,         revertsummaryMode);
    8789        MODECASE(STACKTOOL_MODE_SUMMARY,               summaryMode);
    8890        MODECASE(STACKTOOL_MODE_PENDINGCLEANUPRUN,     pendingcleanuprunMode);
     
    15701572}
    15711573
     1574static bool revertsummaryMode(pxConfig *config) {
     1575  PS_ASSERT_PTR_NON_NULL(config, NULL);
     1576  PXOPT_LOOKUP_S64(sass_id, config->args, "-sass_id", true, false);
     1577
     1578  psString query = pxDataGet("stacktool_revertsummary.sql");
     1579  if (!query) {
     1580    psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     1581    return(false);
     1582  }
     1583  if (!p_psDBRunQueryF(config->dbh, query, sass_id)) {
     1584    psError(PS_ERR_UNKNOWN, false, "database error");
     1585    psFree(query);
     1586    return(false);
     1587  }
     1588  psS64 numUpdated = psDBAffectedRows(config->dbh);
     1589
     1590  if (numUpdated != 1) {
     1591    psError(PS_ERR_UNKNOWN, false, "should have affected 1 row");
     1592    psFree(query);
     1593    return(false);
     1594  }
     1595  psLogMsg("stacktool", PS_LOG_INFO, "Deleted %ld rows", numUpdated);
     1596 
     1597  psFree(query);
     1598
     1599  return(true);
     1600}
     1601
    15721602static bool summaryMode(pxConfig *config)
    15731603{
  • branches/eam_branches/ipp-20130904/ippTools/src/stacktool.h

    r36009 r36370  
    3838    STACKTOOL_MODE_TOSUMMARY,
    3939    STACKTOOL_MODE_ADDSUMMARY,
     40    STACKTOOL_MODE_REVERTSUMMARY,
    4041    STACKTOOL_MODE_SUMMARY,
    4142    STACKTOOL_MODE_PENDINGCLEANUPRUN,
  • branches/eam_branches/ipp-20130904/ippTools/src/stacktoolConfig.c

    r36009 r36370  
    265265    psMetadataAddStr(addsummaryArgs, PS_LIST_TAIL, "-path_base", 0,     "set summary path base", NULL);
    266266
     267    // -revertsummary
     268    psMetadata *revertsummaryArgs = psMetadataAlloc();
     269    psMetadataAddS64(revertsummaryArgs, PS_LIST_TAIL, "-sass_id", 0,   "search by stack association ID", 0);
     270   
    267271    // -summary
    268272    psMetadata *summaryArgs = psMetadataAlloc();
     
    335339    PXOPT_ADD_MODE("-addsumskyfile",   "", STACKTOOL_MODE_ADDSUMSKYFILE,   addsumskyfileArgs);
    336340    PXOPT_ADD_MODE("-sumskyfile",      "list results of stackRun", STACKTOOL_MODE_SUMSKYFILE,      sumskyfileArgs);
    337     PXOPT_ADD_MODE("-sassskyfile",      "list results of stackAssociation", STACKTOOL_MODE_SASSSKYFILE,      sassskyfileArgs);
     341
    338342    PXOPT_ADD_MODE("-revertsumskyfile","", STACKTOOL_MODE_REVERTSUMSKYFILE,      revertsumskyfileArgs);
     343    PXOPT_ADD_MODE("-updatesumskyfile",      "update fault code for sumskyfile",     STACKTOOL_MODE_UPDATESUMSKYFILE,          updatesumskyfileArgs);
     344
    339345    PXOPT_ADD_MODE("-pendingcleanuprun",     "show runs that need to be cleaned up", STACKTOOL_MODE_PENDINGCLEANUPRUN,    pendingcleanuprunArgs);
    340346    PXOPT_ADD_MODE("-pendingcleanupskyfile", "show runs that need to be cleaned up", STACKTOOL_MODE_PENDINGCLEANUPSKYFILE, pendingcleanupskyfileArgs);
    341347    PXOPT_ADD_MODE("-donecleanup",           "show runs that have been cleaned",     STACKTOOL_MODE_DONECLEANUP,          donecleanupArgs);
    342     PXOPT_ADD_MODE("-updatesumskyfile",      "update fault code for sumskyfile",     STACKTOOL_MODE_UPDATESUMSKYFILE,          updatesumskyfileArgs);
     348
     349    PXOPT_ADD_MODE("-sassskyfile",      "list results of stackAssociation", STACKTOOL_MODE_SASSSKYFILE,      sassskyfileArgs);
    343350    PXOPT_ADD_MODE("-tosummary",            "show runs that can be summarized", STACKTOOL_MODE_TOSUMMARY, tosummaryArgs);
    344351    PXOPT_ADD_MODE("-summary",              "show runs that have been summarized", STACKTOOL_MODE_SUMMARY, summaryArgs);
    345352    PXOPT_ADD_MODE("-addsummary",           "add entry to the summary table", STACKTOOL_MODE_ADDSUMMARY, addsummaryArgs);
     353    PXOPT_ADD_MODE("-revertsummary",        "revert entry in the summary table", STACKTOOL_MODE_REVERTSUMMARY, revertsummaryArgs);
     354   
    346355    PXOPT_ADD_MODE("-exportrun",            "export run for import on other database", STACKTOOL_MODE_EXPORTRUN, exportrunArgs);
    347356    PXOPT_ADD_MODE("-importrun",            "import run from metadata file",           STACKTOOL_MODE_IMPORTRUN, importrunArgs);
  • branches/eam_branches/ipp-20130904/ippconfig

  • branches/eam_branches/ipp-20130904/ippconfig/gpc1

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/filerules-split.mdc

    r36284 r36370  
    382382PPSKYCELL.JPEG1              OUTPUT {OUTPUT}.0.b1.jpeg     JPEG            NONE       CHIP       TRUE      NONE
    383383PPSKYCELL.JPEG2              OUTPUT {OUTPUT}.0.b2.jpeg     JPEG            NONE       CHIP       TRUE      NONE
    384 PPSKYCELL.BIN1               OUTPUT {OUTPUT}.b1.fits     IMAGE     COMP_IMG       FPA        TRUE      NONE
    385 PPSKYCELL.BIN2               OUTPUT {OUTPUT}.b2.fits     IMAGE     COMP_IMG       FPA       TRUE      NONE
     384PPSKYCELL.BIN1               OUTPUT {OUTPUT}.b1.fits     IMAGE     NONE       FPA        TRUE      NONE
     385PPSKYCELL.BIN2               OUTPUT {OUTPUT}.b2.fits     IMAGE     NONE       FPA       TRUE      NONE
    386386PPSKYCELL.BIN1.MASK          OUTPUT {OUTPUT}.b1.mk.fits     MASK     COMP_MASK       FPA        TRUE      NONE
    387387PPSKYCELL.BIN2.MASK          OUTPUT {OUTPUT}.b2.mk.fits     MASK     COMP_MASK       FPA       TRUE      NONE
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/ppSub.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/reductionClasses.mdc

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.