IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30409


Ignore:
Timestamp:
Jan 28, 2011, 1:40:34 PM (15 years ago)
Author:
bills
Message:

be prepared for null recoveryroot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20101215/ippScripts/scripts/magic_destreak_revert.pl

    r30321 r30409  
    210210    $bweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $backup_path_base, $class_id);
    211211
    212     $rimage  = $ipprc->filename("PPIMAGE.CHIP", $recovery_path_base, $class_id);
    213     # This is somewhat kludgey but it works whether the mask is camera mask or chip mask
    214     $rmask   = dirname($recovery_path_base) . "/REC_" . basename($mask);
    215     $rch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $class_id);
    216     $rweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $recovery_path_base, $class_id);
     212    if ($recovery_path_base) {
     213        $rimage  = $ipprc->filename("PPIMAGE.CHIP", $recovery_path_base, $class_id);
     214        # This is somewhat kludgey but it works whether the mask is camera mask or chip mask
     215        $rmask   = dirname($recovery_path_base) . "/REC_" . basename($mask);
     216        $rch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $class_id);
     217        $rweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $recovery_path_base, $class_id);
     218    }
    217219} elsif ($stage eq "camera") {
    218220    $astrom =  $ipprc->filename("PSASTRO.OUTPUT", $path_base);
     
    227229    $bweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $backup_path_base);
    228230    $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base);
    229     $rimage  = $ipprc->filename("PSWARP.OUTPUT", $recovery_path_base);
    230     $rmask   = $ipprc->filename("PSWARP.OUTPUT.MASK", $recovery_path_base);
    231     $rweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $recovery_path_base);
     231    if ($recovery_path_base) {
     232        $rimage  = $ipprc->filename("PSWARP.OUTPUT", $recovery_path_base);
     233        $rmask   = $ipprc->filename("PSWARP.OUTPUT.MASK", $recovery_path_base);
     234        $rweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $recovery_path_base);
     235    }
    232236} elsif ($stage eq "diff") {
    233237    my $name = "PPSUB.OUTPUT";
Note: See TracChangeset for help on using the changeset viewer.