Changeset 24936
- Timestamp:
- Jul 28, 2009, 3:50:48 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak_revert.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak_revert.pl
r24856 r24936 95 95 } elsif ($stage eq "diff") { 96 96 $skycell_id = $component; 97 } els e{97 } elsif ($stage ne "camera") { 98 98 &my_die("Invalid value for stage: $stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 99 99 } … … 142 142 143 143 144 my ($image, $mask, $ch_mask, $weight, $sources );145 my ($bimage, $bmask, $bch_mask, $bweight, $bsources );144 my ($image, $mask, $ch_mask, $weight, $sources, $astrom); 145 my ($bimage, $bmask, $bch_mask, $bweight, $bsources, $bastrom); 146 146 147 147 if ($stage eq "raw") { … … 167 167 $bch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $backup_path_base, $class_id); 168 168 $bweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $backup_path_base, $class_id); 169 } elsif ($stage eq "camera") { 170 $astrom = $ipprc->filename("PSASTRO.OUTPUT", $path_base); 171 $bastrom = $ipprc->filename("PSASTRO.OUTPUT", $backup_path_base); 169 172 } elsif ($stage eq "warp") { 170 173 $image = $ipprc->filename("PSWARP.OUTPUT", $path_base); … … 188 191 } 189 192 190 revert_file($image, $bimage) or 193 if ($image) { 194 revert_file($image, $bimage) or 191 195 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 192 193 # don't commit next the next couple of lines and see xxx below 194 # change to if 0 to revert chip runs without masks 196 } 197 195 198 if ($mask) { 196 199 if (!revert_file($mask, $bmask)) { 197 200 if ($stage eq 'chip') { 198 # XXX: don't fail if the mask file fails to revert. It probably doesn't exist 199 # Handle this properly 201 # don't fail if the mask file (from the camera stage) fails to revert. 202 # It probably doesn't exist 203 # XXX: Handle this properly 200 204 print STDERR "failure to revert mask file, ignored\n"; 201 205 } else { … … 206 210 207 211 if ($ch_mask) { 208 # Handle this properly209 212 if (!revert_file($ch_mask, $bch_mask)) { 210 # print STDERR "failure to revert chip mask file, ignored\n";211 213 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 212 214 } … … 222 224 revert_file($sources, $bsources) or 223 225 &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 226 } 227 228 if ($astrom) { 229 revert_file($astrom, $bastrom) or 230 &my_die("failed to restore astrometry file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 224 231 } 225 232
Note:
See TracChangeset
for help on using the changeset viewer.
