IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2008, 11:47:19 AM (18 years ago)
Author:
Paul Price
Message:

Added verbose flags to scripts.

File:
1 edited

Legend:

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

    r16247 r16308  
    3333
    3434# Parse the command-line arguments
    35 my ($exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
     35my ( $exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $verbose,
     36     $no_update, $no_op );
    3637GetOptions(
    37            'exp_id=s'      => \$exp_id,    # Exposure identifier                       
    38            'exp_tag=s'     => \$exp_tag,   # Exposure identifier                       
    39            'chip_id=s'     => \$chip_id,   # Chiptool identifier                       
    40            'class_id=s'    => \$class_id,  # Class identifier                 
    41            'uri|u=s'       => \$uri,       # Input FITS file                   
    42            'camera|c=s'    => \$camera,    # Camera                           
     38           'exp_id=s'      => \$exp_id,    # Exposure identifier
     39           'exp_tag=s'     => \$exp_tag,   # Exposure identifier
     40           'chip_id=s'     => \$chip_id,   # Chiptool identifier
     41           'class_id=s'    => \$class_id,  # Class identifier
     42           'uri|u=s'       => \$uri,       # Input FITS file
     43           'camera|c=s'    => \$camera,    # Camera
    4344           'outroot|w=s'   => \$outroot,   # output file base name
    4445           'dbname|d=s'    => \$dbname,    # Database name
    45            'reduction=s'   => \$reduction, # Reduction class                   
    46            'no-update'     => \$no_update, # Don't update the database?       
    47            'no-op'         => \$no_op,     # Don't do any operations?             
     46           'reduction=s'   => \$reduction, # Reduction class
     47           'verbose'       => \$verbose,   # Print to stdout
     48           'no-update'     => \$no_update, # Don't update the database?
     49           'no-op'         => \$no_op,     # Don't do any operations?
    4850           ) or pod2usage( 2 );
    4951
     
    7072# values to extract from output metadata and the stats to calculate
    7173# XXX commented-out entries are not yet defined in the output files
    72 my $STATS = 
    73    [   
     74my $STATS =
     75   [
    7476       #          PPSTATS KEYWORD         STATISTIC          CHIPTOOL FLAG
    7577       { name => "ROBUST_MEDIAN",  type => "mean",  flag => "-bg",             dtype => "float" },
     
    103105my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1);
    104106my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
    105 if ($missing_tools) { 
     107if ($missing_tools) {
    106108    warn("Can't find required tools.");
    107     exit($PS_EXIT_CONFIG_ERROR); 
     109    exit($PS_EXIT_CONFIG_ERROR);
    108110}
    109111
     
    140142
    141143    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    142         run(command => $command, verbose => 1);
     144        run(command => $command, verbose => $verbose);
    143145    unless ($success) {
    144146        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    185187unless ($no_update) {
    186188    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    187         run(command => $command, verbose => 1);
     189        run(command => $command, verbose => $verbose);
    188190    unless ($success) {
    189191        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
Note: See TracChangeset for help on using the changeset viewer.