IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23728


Ignore:
Timestamp:
Apr 7, 2009, 2:57:58 PM (17 years ago)
Author:
bills
Message:

rename --no_images --poor_quality
don't try and delete tmpdir if it doesn't exist
clarify some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/dist_component.pl

    r23707 r23728  
    5858# Parse the command-line arguments
    5959my ($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);
     60my ($outroot, $run_state, $data_state, $magicked, $no_magic, $poor_quality);
    6161my ($dbname, $save_temps, $verbose, $no_update, $logfile);
    6262
     
    7171           'state=s'        => \$run_state,  # state of the run
    7272           'data_state=s'   => \$data_state, # data_state for this component
    73            'no_images'      => \$no_images,  # the processing for this component did not produced images
     73           'poor_quality'      => \$poor_quality,  # the processing for this component did not produced images
    7474           'no_magic'       => \$no_magic,   # magic is not required for this distribution run
    7575           'magicked'       => \$magicked,   # magicked state for this component
     
    149149#   2. magic is not required for this distRun
    150150#   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);
     151my $nan_masked_pixels = ! ($clean || $no_magic || $poor_quality);
    152152
    153153my ($image, $mask, $variance);
    154154
    155 my @base_list;
    156155foreach my $file_rule (keys %$file_list) {
    157156    # check whether this file rule refers to an image, mask, or variance fits image
     
    169168    my $path = $ipprc->file_resolve($file_name);
    170169
    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    }
    172180
    173181    # open the file to make sure it exists (and to work around the failed mount phenomena)
     
    176184
    177185    # we need to pre-process the image before adding to the bundle. Save the path names.
     186    # the images will be created below
    178187    if ($image_type && $nan_masked_pixels) {
    179188        # save the
     
    189198        }
    190199    } 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
    192202        symlink $path, "$tmpdir/$base";
    193203    }
    194     push @base_list, $base;
    195204}
    196205
     
    208217    &my_die("no mask image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$mask;
    209218    &my_die("no variance image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$variance;
    210 
    211219
    212220    my $class_id;
     
    496504sub delete_tmpdir
    497505{
    498     if (!$save_temps) {
     506    if (!$save_temps and $tmpdir and -e $tmpdir) {
    499507        system "rm -r $tmpdir";
    500508    }
Note: See TracChangeset for help on using the changeset viewer.