IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2021, 4:30:58 PM (5 years ago)
Author:
eugene
Message:

set a state of fail so downstream systems can recognized the poor data quality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-dev-20210817/ippScripts/scripts/warp_overlap.pl

    r41705 r41884  
    150150}
    151151
    152 # If no overlaps are found, we
    153 # keep running this step over and over (a successful warptool -addoverlap prevents
    154 # successive warptime -imfile from running.
    155 &my_die("Unable to find any overlaps", $warp_id, $PS_EXIT_PROG_ERROR) if scalar @overlaps == 0;
     152# If no overlaps are found, the astrometry calibration was poor, but
     153# not bad enough for the camera-stage quality to be marked as bad.
     154# we set the warpRun state to 'fail' since no warpSkyCellMap can be generated.
     155if (scalar @overlaps == 0) {
     156    warn("no overlaps found (bad astrometry); setting warpRun state to 'fail'\n");
     157
     158    # Add the processed file to the database
     159    unless ($no_update) {
     160        my $command = "$warptool -updaterun -set_state fail"; # Command to run warptool
     161        $command .= " -dbname $dbname" if defined $dbname;
     162       
     163        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     164            run(command => $command, verbose => $verbose);
     165        unless ($success) {
     166            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     167            warn("Unable to perform warptool -updaterun -set_state fail: $error_code\n");
     168            exit($error_code);
     169        }
     170    }
     171    exit(0);
     172}
    156173
    157174# Generate a MDC file with the overlaps
Note: See TracChangeset for help on using the changeset viewer.