IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31476


Ignore:
Timestamp:
May 6, 2011, 2:48:08 PM (15 years ago)
Author:
watersc1
Message:

diff queuing bug resolved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110505/ippScripts/scripts/lap_science.pl

    r31472 r31476  
    734734            $command .= " -set_dist_group $exposure->{dist_group} ";
    735735        }
    736        
     736        my $retry_command;
    737737        if ($exposure->{pairwise}) { # warpwarp
    738738            my $companion = ${ $exposures }[$match_hash{$exposure->{chip_id}}];
    739739            $command .= " -definewarpwarp ";
    740             $command .= "-input_label $label -template_label $label -backwards ";
     740            $command .= "-input_label $label -template_label $label ";
    741741            $command .= "-warp_id $exposure->{warp_id} -template_warp_id $companion->{warp_id} ";
     742            $retry_command = $command;
     743            $command .= " -backwards "; # This usually works.
    742744            $already_queued{$exposure->{warp_id}} = 1;
    743745            $already_queued{$companion->{warp_id}} = 1;
     
    763765        my $diff_id = $diff->{diff_id};
    764766        unless (defined($diff_id)) {
    765             $exposure->{data_state} = 'drop';
    766             &update_this_exposure($exposure);
    767         }
    768        
     767            if ($retry_command) {
     768                ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     769                    run(command => $retry_command, verbose => $verbose);
     770                unless ($success) {
     771                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     772                    &my_die("unable to perform difftool -definewarp(warp|stack): $error_code", $exposure->{lap_id}, $exposure->{proj_cell});
     773                }
     774               
     775                $diffs = $mdcParser->parse_list(join "", @$stdout_buf) or
     776                    &my_die("Unable to parse metadata from difftool -definewarp(warp|stack)", $lap_id, "");
     777               
     778                $diff = ${ $diffs }[0];
     779                $diff_id = $diff->{diff_id};
     780            }
     781            unless (defined($diff_id)) {
     782                $exposure->{data_state} = 'drop';
     783                &update_this_exposure($exposure);
     784            }
     785        }
    769786    }
    770787}
Note: See TracChangeset for help on using the changeset viewer.