IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30926


Ignore:
Timestamp:
Mar 16, 2011, 12:13:32 PM (15 years ago)
Author:
bills
Message:

In distribution, handle case where a poor quality component has no config dump file.

Location:
tags/ipp-20110218/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110218/ippScripts/scripts/dist_bundle.pl

    r30653 r30926  
    7070
    7171# Parse the command-line arguments
    72 my ($camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $alt_path_base, $clean);
     72my ($camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $alt_path_base, $clean, $exp_type);
    7373my ($outroot, $run_state, $data_state, $magicked, $no_magic, $poor_quality, $results_file, $prefix);
    7474my ($dbname, $save_temps, $verbose, $no_update, $logfile);
     
    8989           'alt_path_base=s'=> \$alt_path_base,  # path to alternate inputs
    9090           'outroot=s'      => \$outroot,    # outroot
     91           'exp_type=s'     => \$exp_type,   # exp_type (only used for raw stage
    9192           'prefix=s'       => \$prefix,     # "prefix" to apply to filenames
    9293           'clean'          => \$clean,      # create clean distribution
     
    99100
    100101pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    101 pod2usage( -msg => "Required options: --camera --stage --stage_id --component --path_base --outroot",
     102pod2usage( -msg => "Required options: --camera --stage --stage_id --component --exp_type --path_base --outroot",
    102103           -exitval => 3) unless
    103104    defined $camera and
     
    105106    defined $stage_id and
    106107    defined $component and
     108    defined $exp_type and
    107109    defined $path_base and
    108110    defined $outroot;
     
    110112$ipprc->redirect_output($logfile) if $logfile;
    111113
    112 if (($stage eq 'raw') and !$clean and !defined $chip_path_base) {
    113     pod2usage( -msg => "Required options: --chip_path_base for raw stage", -exitval => 3);
     114if ($stage eq 'raw' and !$clean and !$no_magic) {
     115    # need to be able to find chip mask file
     116    if ($exp_type eq 'OBJECT' and !defined $chip_path_base) {
     117        pod2usage( -msg => "Required options: --chip_path_base for raw stage", -exitval => 3);
     118    }
    114119}
    115120
     
    123128my $file_list = get_file_list($stage, $component, $path_base, $clean);
    124129
    125 if (($stage ne 'raw') and ($stage ne 'fake')) {
     130if (($stage ne 'raw') and ($stage ne 'fake') and !$poor_quality) {
    126131    # If the file list is empty it is an error because we should at least get a config dump file
    127132    # except for fake stage which doesn't do anything yet
     
    493498            push @file_list, \%image;
    494499
    495             my %burntool_table;
    496             $burntool_table{file_rule} = "BURNTOOL.TABLE";
    497             $burntool_table{name} = "$path_base.burn.tbl";
    498             push @file_list, \%burntool_table;
     500            if ($exp_type eq 'OBJECT' and $camera eq 'GPC1') {
     501                my %burntool_table;
     502                $burntool_table{file_rule} = "BURNTOOL.TABLE";
     503                $burntool_table{name} = "$path_base.burn.tbl";
     504                push @file_list, \%burntool_table;
     505            }
    499506        }
    500507        return \@file_list;
     
    541548    my $resolved = $ipprc->file_resolve($config_file);
    542549
     550    if (!$resolved and $poor_quality) {
     551        print STDERR "non config file found but continuing since component has poor quality\n";
     552        return undef
     553    }
    543554    &my_die("failed to resolve name of config dump file: $config_file_rule", $component,
    544555                    $PS_EXIT_CONFIG_ERROR) if (!$resolved);
  • tags/ipp-20110218/ippScripts/scripts/dist_component.pl

    r30489 r30926  
    3737# Parse the command-line arguments
    3838my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean, $alt_path_base);
    39 my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality);
     39my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality, $exp_type);
    4040my ($dbname, $save_temps, $verbose, $no_update, $logfile);
    4141
     
    5353           'no_magic'       => \$no_magic,   # magic is not required for this distribution run
    5454           'magicked'       => \$magicked,   # magicked state for this component
     55           'exp_type=s'     => \$exp_type,
    5556           'alt_path_base=s'=> \$alt_path_base,  # path to alternate inputs
    5657           'outdir=s'       => \$outdir,     # "directory" for outputs
     
    8182$temproot = "/tmp" if !defined $temproot;
    8283
    83 if (($stage eq 'raw') and !$clean and !defined $chip_path_base) {
    84     pod2usage( -msg => "Required options: --chip_path_base for raw stage", -exitval => 3);
     84if (($stage eq 'raw') and !$clean and !(defined $chip_path_base and defined $exp_type)) {
     85    pod2usage( -msg => "Required options: --chip_path_base --exp_type for raw stage", -exitval => 3);
    8586}
    8687
     
    105106    $command .= " --magicked" if defined $magicked;
    106107    $command .= " --alt_path_base $alt_path_base" if defined $alt_path_base;
     108    $command .= " --exp_type $exp_type" if defined $exp_type;
    107109    $command .= " --clean" if defined $clean;
    108110    $command .= " --save-temps" if defined $save_temps;
Note: See TracChangeset for help on using the changeset viewer.