IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27921


Ignore:
Timestamp:
May 11, 2010, 4:07:08 PM (16 years ago)
Author:
bills
Message:

don't require magic for the diff part of Stack stack diffs. It is required for
the inputs in order for them to be processed though. Fix typo in stacktool commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_checkdependent.pl

    r27874 r27921  
    2121use Carp;
    2222
     23# XXX: put this in a module somewhere
     24my $IPP_DIFF_MODE_WARP_WARP   = 1;
     25my $IPP_DIFF_MODE_WARP_STACK  = 2;
     26my $IPP_DIFF_MODE_STACK_WARP  = 3;
     27my $IPP_DIFF_MODE_STACK_STACK = 4;
    2328
    2429my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic);
     
    103108# Got "it"
    104109
     110my $magic_ok = 0;
     111if ($stage eq 'diff') {
     112    if ($it->{diff_mode} == $IPP_DIFF_MODE_STACK_STACK) {
     113        # stack stack diffs don't need magic, but since the warps need to have the chips destreaked
     114        # in order to be processed se set need_magic in the database for all runs
     115        # Now the diffs themselves don't need to be destreaked so
     116        $magic_ok = 1;
     117    }
     118}
    105119my $status = 0;
    106120if (($it->{state} eq 'full') or ($it->{state} eq 'update') and ($whole_run or ($it->{data_state} eq 'full'))
    107         and (!$need_magic or $it->{magicked} > 0)) {
     121        and (!$need_magic or $magic_ok or $it->{magicked} > 0)) {
    108122
    109123    # This Dependency is satisfied. All done!
     
    359373        my $skycell_id = $skycell->{skycell_id};
    360374
    361         # XXX: put this in a module somewhere
    362         my $IPP_DIFF_MODE_WARP_WARP   = 1;
    363         my $IPP_DIFF_MODE_WARP_STACK  = 2;
    364         my $IPP_DIFF_MODE_STACK_WARP  = 3;
    365         my $IPP_DIFF_MODE_STACK_STACK = 4;
    366375        if ($diff_mode == $IPP_DIFF_MODE_WARP_STACK ) {
    367376            # check the state of the template stack
    368             my $command = "$stacktool -sumkskyfile -stack_id $skycell->{stack2}";
     377            my $command = "$stacktool -sumskyfile -stack_id $skycell->{stack2}";
    369378            my $stack = runToolAndParseExpectOne($command, $verbose);
    370379            my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack2}", $PS_EXIT_UNKNOWN_ERROR) if !$stack;
     
    416425        } elsif ($diff_mode == $IPP_DIFF_MODE_STACK_STACK ) {
    417426            # check the state of the input stack
    418             my $command = "$stacktool -sumkskyfile -stack_id $skycell->{stack2}";
     427            my $command = "$stacktool -sumskyfile -stack_id $skycell->{stack2}";
    419428            my $stack1 = runToolAndParseExpectOne($command, $verbose);
    420429            my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack2}", $PS_EXIT_UNKNOWN_ERROR) if !$stack1;
     
    427436            }
    428437            # check the state of the template stack
    429             $command = "$stacktool -sumkskyfile -stack_id $skycell->{stack2}";
     438            $command = "$stacktool -sumskyfile -stack_id $skycell->{stack2}";
    430439            my $stack2 = runToolAndParseExpectOne($command, $verbose);
    431440            my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack2}", $PS_EXIT_UNKNOWN_ERROR) if !$stack2;
     
    441450        } elsif ($diff_mode == $IPP_DIFF_MODE_STACK_WARP ) {
    442451            # check the state of the input stack
    443             my $command = "$stacktool -sumkskyfile -stack_id $skycell->{stack1}";
     452            my $command = "$stacktool -sumskyfile -stack_id $skycell->{stack1}";
    444453            my $stack = runToolAndParseExpectOne($command, $verbose);
    445454            my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack1}", $PS_EXIT_UNKNOWN_ERROR) if !$stack;
Note: See TracChangeset for help on using the changeset viewer.