IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30670


Ignore:
Timestamp:
Feb 17, 2011, 11:27:11 AM (15 years ago)
Author:
bills
Message:

fix problem in mode goto_restored and where recovery_path_base is null

File:
1 edited

Legend:

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

    r30260 r30670  
    191191    # Note that when destreaking as part of an update $magicked is non-zero.
    192192    # In this case we do not touch the camera stage mask so there is no need to revert it
    193     if (!$magicked and $dynamicMasks) {
     193    if ($dynamicMasks and (!$magicked or ($run_state eq 'goto_restored'))) {
    194194        $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
    195195        $ch_mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     
    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.