IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2011, 4:50:08 PM (15 years ago)
Author:
heather
Message:

addtool minidvodb verification added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/minidvodb_merge.pl

    r28311 r30912  
    1616my $dtime_relphot;
    1717my $dtime_merge;
     18my $dtime_verify;
     19my $dtime_script;
    1820
    1921use vars qw( $VERSION );
     
    3638my $relphot = can_run('relphot') or (warn "Can't find relphot" and $missing_tools = 1);
    3739my $relastro = can_run('relastro') or (warn "Can't find relastro" and $missing_tools = 1);
     40my $dvoverify = can_run('dvoverify') or (warn "Can't find dvoverify" and $missing_tools = 1);
     41
     42
    3843if ($missing_tools) {
    3944    warn("Can't find required tools.");
     
    8792unless ($no_op) {
    8893    if (defined $mergedvodbReal) {
     94
     95        #this is chopped into several parts:  addstar, relphot, dvoverify, merge
     96
     97
     98        #addstar
    8999        {
    90100            my $command  = "$addstar -resort";
     
    105115            print "addstar -resort time $dtime_addstar\n";
    106116        }
     117
     118        #relphot
    107119
    108120        {
     
    124136            print "relphot time $dtime_relphot\n";
    125137        }
     138        #dvoverify
     139        {
     140            my $command  = "$dvoverify -s $minidvodb";
     141            print "$command\n";
     142            my $mjd_dvoverify_start = DateTime->now->mjd;   # MJD of starting script
     143
     144            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     145                run(command => $command, verbose => $verbose);
     146            unless ($success) {
     147                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     148                &my_die("Unable to perform dvoverify: $error_code", $mergedvodb, $error_code);
     149            }
     150            $dtime_dvoverify = 86400.0*(DateTime->now->mjd - $mjd_dvoverify_start);   # MJD of starting script
     151            print "dvoverify time $dtime_dvoverify\n";
     152        }
     153
     154
     155        #Merge
    126156
    127157        my $this_is_the_first;
     
    190220
    191221        {
     222
     223            $dtime_script = 86400.0*(DateTime->now->mjd - $mjd_start);
     224
     225
    192226            my $command = "addtool -minidvodb_id $minidvodb_id";
    193227            $command .= " -addminidvodbprocessed";
     
    197231            $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort;
    198232            $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge;
    199             $command .= " -dbname $dbname" if defined $dbname;
     233            $command .= " -dtime_script $dtime_script" if defined $dtime_script;
     234            $command .= " -dtime_verify $dtime_dvoverify" if defined $dtime_dvoverify;
     235            $command .= " -dbname $dbname" if defined $dbname;
    200236            #print $command;
    201237
     
    236272        $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort;
    237273        $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge;
     274    $command .= " -dtime_script $dtime_script" if defined $dtime_script;
     275    $command .= " -dtime_verify $dtime_dvoverify" if defined $dtime_dvoverify;
    238276        $command .= " -dbname $dbname" if defined $dbname;
    239277
Note: See TracChangeset for help on using the changeset viewer.