IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41893 for trunk/ippScripts


Ignore:
Timestamp:
Nov 4, 2021, 6:06:03 PM (5 years ago)
Author:
eugene
Message:

warp_overlap sets warpRun state to fail if no overlaps are found

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

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

    r41463 r41893  
    15171517            my $this_exp_id  = ${ $this_warp }[0];
    15181518            my $this_quality = ${ $this_warp }[5];
    1519             if ($this_quality != 0) {
    1520                 print STDERR "diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality\n";
     1519            my $this_state   = ${ $this_warp }[4];
     1520            if (($this_quality != 0) || ($this_state eq 'fail') ) {
     1521                print STDERR "diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state\n";
    15211522            }
    15221523            else {
     
    17061707                my $this_exp_id  = ${ $this_warp }[0];
    17071708                my $this_quality = ${ $this_warp }[5];
    1708                 if ($this_quality != 0) {
    1709                     print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality\n";
     1709                my $this_state   = ${ $this_warp }[4];
     1710                if (($this_quality != 0) || ($this_state eq 'fail') ) {
     1711                    print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state\n";
    17101712                }
    17111713                else {
     
    19221924                my $this_exp_id  = ${ $this_warp }[0];
    19231925                my $this_quality = ${ $this_warp }[5];
    1924                 if ($this_quality != 0) {
    1925                     print STDERR "desp_diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality\n";
     1926                my $this_state   = ${ $this_warp }[4];
     1927                if (($this_quality != 0) || ($this_state eq 'fail') ) {
     1928                    print STDERR "desp_diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state\n";
    19261929                }
    19271930                else {
  • trunk/ippScripts/scripts/warp_overlap.pl

    r41705 r41893  
    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.