IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2006, 11:54:11 AM (20 years ago)
Author:
Paul Price
Message:

Adding -no-update option (bug 825).

File:
1 edited

Legend:

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

    r9004 r9091  
    1515use Pod::Usage qw( pod2usage );
    1616
    17 my ($det_id, $iter, $det_type);
     17my ($det_id, $iter, $det_type, $no_update);
    1818GetOptions(
    1919    'det_id|d=s'        => \$det_id,
    2020    'iteration=s'       => \$iter,
    2121    'det_type|t=s'      => \$det_type,
     22    'no-update'         => \$no_update
    2223) or pod2usage( 2 );
    2324
     
    158159
    159160# Put the result into the database
    160 {
    161     my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter " .
    162         "-bg " . $meanStats->mean() . " -bg_stdev " . $stdevStats->mean() .
    163         " -bg_mean_stdev " . $meanStdevStats->mean();
    164     $command .= " -reject" if not $master;
    165 
    166     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    167         run(command => $command, verbose => 1);
    168     die "Unable to perform dettool -adddetrunsummary: $error_code\n" if not $success;
    169 }
    170 
    171 # Re-run processing if required
    172 {
    173     my $command = "$dettool -updatedetrun -det_id $det_id";
    174     if ($stop) {
    175         $command .= ' -stop';
    176     } else {
    177         $command .= ' -again';
     161unless ($no_update) {
     162    {
     163        my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter " .
     164            "-bg " . $meanStats->mean() . " -bg_stdev " . $stdevStats->mean() .
     165            " -bg_mean_stdev " . $meanStdevStats->mean();
     166        $command .= " -reject" if not $master;
     167       
     168        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     169            run(command => $command, verbose => 1);
     170        die "Unable to perform dettool -adddetrunsummary: $error_code\n" if not $success;
    178171    }
    179172   
    180     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    181         run(command => $command, verbose => 1);
    182     die "Unable to perform dettool -updatedetrun: $error_code\n" if not $success;
     173    # Re-run processing if required
     174    {
     175        my $command = "$dettool -updatedetrun -det_id $det_id";
     176        if ($stop) {
     177            $command .= ' -stop';
     178        } else {
     179            $command .= ' -again';
     180        }
     181       
     182        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     183            run(command => $command, verbose => 1);
     184        die "Unable to perform dettool -updatedetrun: $error_code\n" if not $success;
     185    }
    183186}
    184187__END__
Note: See TracChangeset for help on using the changeset viewer.