Changeset 23728
- Timestamp:
- Apr 7, 2009, 2:57:58 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/dist_component.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_component.pl
r23707 r23728 58 58 # Parse the command-line arguments 59 59 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean); 60 my ($outroot, $run_state, $data_state, $magicked, $no_magic, $ no_images);60 my ($outroot, $run_state, $data_state, $magicked, $no_magic, $poor_quality); 61 61 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 62 62 … … 71 71 'state=s' => \$run_state, # state of the run 72 72 'data_state=s' => \$data_state, # data_state for this component 73 ' no_images' => \$no_images, # the processing for this component did not produced images73 'poor_quality' => \$poor_quality, # the processing for this component did not produced images 74 74 'no_magic' => \$no_magic, # magic is not required for this distribution run 75 75 'magicked' => \$magicked, # magicked state for this component … … 149 149 # 2. magic is not required for this distRun 150 150 # 3. the processing for the component produced no images (warp or diff with bad quality for example) 151 my $nan_masked_pixels = ! ($clean || $no_magic || $ no_images);151 my $nan_masked_pixels = ! ($clean || $no_magic || $poor_quality); 152 152 153 153 my ($image, $mask, $variance); 154 154 155 my @base_list;156 155 foreach my $file_rule (keys %$file_list) { 157 156 # check whether this file rule refers to an image, mask, or variance fits image … … 169 168 my $path = $ipprc->file_resolve($file_name); 170 169 171 &my_die("failed to resolve $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR) if !$path; 170 if (!$path) { 171 # skip this file if $poor_quality 172 # this is for compatability with older runs which don't have the files list in the 173 # config dump. 174 # Once we give up on supporting that we can remove the next line. (If the file is in the list 175 # it must exist) 176 next if $poor_quality; 177 178 &my_die("failed to resolve $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR); 179 } 172 180 173 181 # open the file to make sure it exists (and to work around the failed mount phenomena) … … 176 184 177 185 # we need to pre-process the image before adding to the bundle. Save the path names. 186 # the images will be created below 178 187 if ($image_type && $nan_masked_pixels) { 179 188 # save the … … 189 198 } 190 199 } else { 191 # create a symbolic link from the file in the nebulous repositorythe into the temporary directory 200 # create a symbolic link from the file in the nebulous repository 201 # in the temporary directory 192 202 symlink $path, "$tmpdir/$base"; 193 203 } 194 push @base_list, $base;195 204 } 196 205 … … 208 217 &my_die("no mask image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$mask; 209 218 &my_die("no variance image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 210 211 219 212 220 my $class_id; … … 496 504 sub delete_tmpdir 497 505 { 498 if (!$save_temps ) {506 if (!$save_temps and $tmpdir and -e $tmpdir) { 499 507 system "rm -r $tmpdir"; 500 508 }
Note:
See TracChangeset
for help on using the changeset viewer.
