Changeset 30520
- Timestamp:
- Feb 8, 2011, 10:23:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak_cleanup.pl
r30356 r30520 159 159 my $component = $comp->{component}; 160 160 my $backup_path_base = $comp->{backup_path_base}; 161 my $recovery_path_base = $comp->{recovery_path_base};162 161 my ($bimage, $bmask, $bch_mask, $bweight, $bsources, $bastrom); 163 162 my ($rimage, $rmask, $rch_mask, $rweight, $rsources, $rastrom); … … 197 196 $bsources = $ipprc->filename("PSPHOT.OUTPUT", $backup_path_base, $component); 198 197 } 199 if ($recovery_path_base) {200 $rimage = $ipprc->filename("PPIMAGE.CHIP", $recovery_path_base, $component);201 202 if ($dynamicMasks) {203 my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component);204 # This is kludgey but correct205 $rmask = dirname($recovery_path_base) . "/" . basename($mask);206 $rch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $component);207 } else {208 $rmask = $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $component);209 }210 $rweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $recovery_path_base, $component);211 }212 198 } elsif ($stage eq "camera") { 213 199 if ($backup_path_base) { … … 221 207 $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base); 222 208 } 223 if ($recovery_path_base) {224 $rimage = $ipprc->filename("PSWARP.OUTPUT", $recovery_path_base);225 $rmask = $ipprc->filename("PSWARP.OUTPUT.MASK", $recovery_path_base);226 $rweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $recovery_path_base);227 $rsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $recovery_path_base);228 }229 209 } elsif ($stage eq "diff") { 230 210 my $name = "PPSUB.OUTPUT"; 211 if ($backup_path_base) { 212 $bimage = $ipprc->filename($name, $backup_path_base); 213 $bmask = $ipprc->filename("$name.MASK", $backup_path_base); 214 $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base); 215 # bills 2011-01-24 216 # don't clean up the uncensored Diff sources file 217 # $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 218 } 219 } 220 221 delete_files($bimage, $bmask, $bweight, $bsources, $bastrom, $bch_mask, $rch_mask); 222 223 if ($stage eq "diff" and $warp_warp) { 224 my $name = "PPSUB.INVERSE"; 231 225 if ($backup_path_base) { 232 226 $bimage = $ipprc->filename($name, $backup_path_base); … … 237 231 # $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 238 232 } 239 if ($recovery_path_base) { 240 $rimage = $ipprc->filename($name, $recovery_path_base); 241 $rmask = $ipprc->filename("$name.MASK", $recovery_path_base); 242 $rweight = $ipprc->filename("$name.VARIANCE", $recovery_path_base); 243 $rsources = $ipprc->filename("$name.SOURCES", $recovery_path_base); 244 } 245 } 246 247 delete_files($rimage, $rmask, $rweight, $rsources, $rastrom, $bimage, $bmask, $bweight, $bsources, $bastrom, $bch_mask, $rch_mask); 248 249 if ($stage eq "diff" and $warp_warp) { 250 my $name = "PPSUB.INVERSE"; 251 if ($backup_path_base) { 252 $bimage = $ipprc->filename($name, $backup_path_base); 253 $bmask = $ipprc->filename("$name.MASK", $backup_path_base); 254 $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base); 255 # bills 2011-01-24 256 # don't clean up the uncensored sources file 257 # $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 258 } 259 if ($recovery_path_base) { 260 $rimage = $ipprc->filename($name, $recovery_path_base); 261 $rmask = $ipprc->filename("$name.MASK", $recovery_path_base); 262 $rweight = $ipprc->filename("$name.VARIANCE", $recovery_path_base); 263 $rsources = $ipprc->filename("$name.SOURCES", $recovery_path_base); 264 } 265 # undef is not necessary, it's just to keep the lists in the same order. 266 delete_files($rimage, $rmask, $rweight, $rsources, undef, $bimage, $bmask, $bweight, $bsources); 233 delete_files($bimage, $bmask, $bweight, $bsources); 267 234 } 268 235 my $command = "$magicdstool -tocleanedfile -magic_ds_id $magic_ds_id -component $component";
Note:
See TracChangeset
for help on using the changeset viewer.
