Changeset 29495 for trunk/ippScripts/scripts/magic_destreak.pl
- Timestamp:
- Oct 20, 2010, 11:53:36 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak.pl
r28931 r29495 42 42 # Parse the command-line arguments 43 43 my ($magic_ds_id, $camera, $streaks, $inv_streaks, $exp_id, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base, $cam_reduction); 44 my ($streaks_path_base, $inv_streaks_path_base); 44 45 my ($outroot, $recoveryroot, $magicked); 45 46 my ($replace, $release); … … 49 50 'magic_ds_id=s' => \$magic_ds_id,# Magic destreak run identifier 50 51 'camera=s' => \$camera, # camera for evaluating file rules 52 'streaks_path_base=s' => \$streaks_path_base, # path_base for streaks data 53 'inv_streaks_path_base=s' => \$inv_streaks_path_base, #path_base for streaks from inverse diff 54 'inv_streaks=s' => \$inv_streaks,# file containing the list of streaks from the inverse diff 51 55 'streaks=s' => \$streaks, # file containing the list of streaks 52 56 'inv_streaks=s' => \$inv_streaks,# file containing the list of streaks from the inverse diff … … 78 82 defined $camera and 79 83 defined $streaks and 84 defined $streaks_path_base and 80 85 defined $stage and 81 86 defined $stage_id and … … 108 113 &my_die("Invalid value for stage: $stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 109 114 } 115 $inv_streaks_path_base = undef if defined($inv_streaks_path_base) and ($inv_streaks_path_base eq "NULL"); 110 116 $inv_streaks = undef if defined($inv_streaks) and ($inv_streaks eq "NULL"); 111 117 … … 240 246 my ($allstreaks_fh, $allstreaks_name); 241 247 248 # Set name of streaks files from their path_base. Note. ne 'NULL' test is for backward compatability 249 # with runs that don't have path_base set yet 250 if ($streaks_path_base ne 'NULL') { 251 $streaks = "$streaks_path_base.streaks"; 252 } 253 if ($inv_streaks_path_base and ($inv_streaks_path_base ne 'NULL')) { 254 $inv_streaks = "$inv_streaks_path_base.streaks"; 255 } 256 257 my $streaks_resolved = $ipprc->file_resolve($streaks) or &my_die("failed to resolve streaks file $streaks", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR); 258 my $inv_streaks_resolved; 259 if ($inv_streaks) { 260 $inv_streaks_resolved = $ipprc->file_resolve($inv_streaks) or &my_die("failed to resolve inverse streaks file $inv_streaks", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR); 261 } 262 263 242 264 if ($stage eq "raw") { 243 265 $image = $uri; … … 301 323 $sources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $path_base); 302 324 303 if ($inv_streaks ) {325 if ($inv_streaks_resolved) { 304 326 # create a temporary file containing the contents of the 305 327 # two streaks files … … 307 329 UNLINK => !$save_temps); 308 330 309 combine_streaks($allstreaks_fh, $streaks , $inv_streaks);331 combine_streaks($allstreaks_fh, $streaks_resolved, $inv_streaks_resolved); 310 332 311 333 # apply the combined streaks to both the forward and inverse diffs 312 $streaks = $allstreaks_name;334 $streaks_resolved = $allstreaks_name; 313 335 } 314 336 } 315 337 316 338 { 317 my $command = "$streaksremove -stage $stage -tmproot $tmproot -streaks $streaks -image $image";339 my $command = "$streaksremove -stage $stage -tmproot $tmproot -streaks $streaks_resolved -image $image"; 318 340 319 341 $command .= " -stats $statsFile"; … … 340 362 } 341 363 } 342 if (($stage eq "diff") and $inv_streaks ) {364 if (($stage eq "diff") and $inv_streaks_resolved) { 343 365 $image = $ipprc->filename("PPSUB.INVERSE", $path_base); 344 366 $mask = $ipprc->filename("PPSUB.INVERSE.MASK", $path_base); … … 349 371 my $invStatsFile = "$outroot/$exp_id.mds.$magic_ds_id.$stage_id.$component.inv.stats"; 350 372 351 my $command = "$streaksremove -stage $stage -tmproot $tmproot -streaks $streaks -image $image";373 my $command = "$streaksremove -stage $stage -tmproot $tmproot -streaks $streaks_resolved -image $image"; 352 374 $command .= " -stats $invStatsFile"; 353 375
Note:
See TracChangeset
for help on using the changeset viewer.
