IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 20, 2009, 8:30:38 AM (17 years ago)
Author:
bills
Message:

may need to revert sources file too

File:
1 edited

Legend:

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

    r24726 r24856  
    6060
    6161pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    62 pod2usage( -msg => "Required options: --magic_ds_id --camera --streaks --stage --stage_id --component --uri --path_base --outroot",
     62pod2usage( -msg => "Required options: --magic_ds_id --camera --stage --stage_id --component --path_base --outroot",
    6363           -exitval => 3) unless
    6464    defined $magic_ds_id and
     
    142142
    143143
    144 my ($image, $mask, $ch_mask, $weight);
    145 my ($bimage, $bmask, $bch_mask, $bweight);
     144my ($image, $mask, $ch_mask, $weight, $sources);
     145my ($bimage, $bmask, $bch_mask, $bweight, $bsources);
    146146
    147147if ($stage eq "raw") {
     
    171171    $mask   = $ipprc->filename("PSWARP.OUTPUT.MASK", $path_base);
    172172    $weight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $path_base);
     173    $sources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $path_base);
    173174    $bimage  = $ipprc->filename("PSWARP.OUTPUT", $backup_path_base);
    174175    $bmask   = $ipprc->filename("PSWARP.OUTPUT.MASK", $backup_path_base);
    175176    $bweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $backup_path_base);
     177    $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base);
    176178} elsif ($stage eq "diff") {
    177179    my $name = $inverse ? "PPSUB.INVERSE" : "PPSUB.OUTPUT"; # Base name for images
     
    179181    $mask   = $ipprc->filename("$name.MASK", $path_base);
    180182    $weight = $ipprc->filename("$name.VARIANCE", $path_base);
     183    $sources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $path_base);
    181184    $bimage  = $ipprc->filename($name, $backup_path_base);
    182185    $bmask   = $ipprc->filename("$name.MASK", $backup_path_base);
    183186    $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base);
     187    $bsources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $backup_path_base);
    184188}
    185189
     
    189193# don't commit next the next couple of lines and see xxx below
    190194# change to if 0 to revert chip runs without masks
    191 if (0) {
    192 
    193195if ($mask) {
    194196    if (!revert_file($mask, $bmask)) {
     
    211213}
    212214
    213 # xxx don't commmit next line
    214 }
    215215
    216216if ($weight) {
    217217    revert_file($weight, $bweight) or
    218218        &my_die("failed to restore variance image", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
     219}
     220
     221if ($sources) {
     222    revert_file($sources, $bsources) or
     223        &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
    219224}
    220225
Note: See TracChangeset for help on using the changeset viewer.