Changeset 30758 for trunk/ippScripts/scripts/magic_destreak_revert.pl
- Timestamp:
- Feb 24, 2011, 2:51:58 PM (15 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
r30754 r30758 163 163 $image = $path_base . ".fits"; 164 164 } 165 $bimage = $backup_path_base . ".fits"; 165 if ($backup_path_base =~ /.*\.fits$/) { 166 $bimage = $backup_path_base; 167 } else { 168 $bimage = $backup_path_base . ".fits"; 169 } 166 170 } elsif ($stage eq "chip") { 167 171 # Check to see if we're using dynamic masks … … 303 307 sub revert_files { 304 308 my $replace = shift; 305 return if !$replace;309 # return if !$replace; 306 310 307 311 my $image = shift; … … 317 321 318 322 if ($image) { 319 revert_file($ image, $bimage) or323 revert_file($replace, $image, $bimage) or 320 324 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 321 325 } 322 326 323 327 if ($mask) { 324 if (!revert_file($ mask, $bmask)) {328 if (!revert_file($replace, $mask, $bmask)) { 325 329 &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 326 330 } … … 328 332 329 333 if ($ch_mask) { 330 if (!revert_file($ ch_mask, $bch_mask)) {334 if (!revert_file($replace, $ch_mask, $bch_mask)) { 331 335 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 332 336 } … … 335 339 336 340 if ($weight) { 337 revert_file($ weight, $bweight) or341 revert_file($replace, $weight, $bweight) or 338 342 &my_die("failed to restore variance image", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 339 343 } 340 344 341 345 if ($sources) { 342 revert_file($ sources, $bsources) or346 revert_file($replace, $sources, $bsources) or 343 347 &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 344 348 } 345 349 346 350 if ($astrom) { 347 revert_file($ astrom, $bastrom) or351 revert_file($replace, $astrom, $bastrom) or 348 352 &my_die("failed to restore astrometry file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 349 353 } … … 367 371 sub revert_file 368 372 { 373 my $replace = shift; 369 374 my $original = shift; 370 375 my $backup = shift;
Note:
See TracChangeset
for help on using the changeset viewer.
