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/detrend_norm_calc.pl

    r16196 r16308  
    3232
    3333# Parse command-line arguments
    34 my ($det_id, $iter, $detType, $outroot, $dbname, $no_update, $no_op);
     34my ($det_id, $iter, $detType, $outroot, $dbname, $verbose, $no_update, $no_op);
    3535GetOptions(
    3636        'det_id|d=s'    => \$det_id,    # Detrend id                         
     
    3939        'outroot|w=s'   => \$outroot,   # output file base name
    4040        'dbname|d=s'    => \$dbname,    # Database name                     
     41        'verbose'       => \$verbose,   # Print to stdout
    4142        'no-update'     => \$no_update, # Don't update the database?         
    4243        'no-op'         => \$no_op,     # Don't do operations               
     
    8889    my @command = split /\s+/, $command;
    8990    my ( $stdin, $stdout, $stderr ); # Buffers for running program
    90     print "Running [$command]...\n";
     91    print "Running [$command]...\n" if $verbose;
    9192    if (not run(\@command, \$stdin, \$stdout, \$stderr)) {
    9293        &my_die("Unable to perform dettool -processedimfile on detrend $det_id/$iter: $?",
    9394                $det_id, $iter, $PS_EXIT_SYS_ERROR);
    9495    }
    95 #    print $stdout . "\n";
     96    print $stdout . "\n" if $verbose;
    9697   
    9798    # Because of the length, need to split into individual metadatas --- it parses SO much quicker!
     
    141142        my ( $stdout, $stderr ); # Buffers for running program
    142143        my @command = split /\s+/, $ppNormCalc;
    143         print "Running [$ppNormCalc]...\n";
     144        print "Running [$ppNormCalc]...\n" if $verbose;
    144145        if (not run(\@command, \$normData, \$stdout, \$stderr)) {
    145146            &my_die("Unable to perform ppNormCalc: $?", $det_id, $iter, $PS_EXIT_SYS_ERROR);
    146147        }
    147         print $stdout . "\n";
     148        print $stdout . "\n" if $verbose;
    148149       
    149150        # Parse the output
     
    187188
    188189        my ( $stdin, $stdout, $stderr ); # Buffers for running program
    189         print "Running [$command]...\n";
     190        print "Running [$command]...\n" if $verbose;
    190191        if (not run \@command, \$stdin, \$stdout, \$stderr) {
    191192            warn("Unable to perform dettool -addnormstat for $className: $?");
    192193            exit($PS_EXIT_SYS_ERROR);
    193194        }
    194         print $stdout . "\n";
     195        print $stdout . "\n" if $verbose;
    195196    }
    196197} else {
Note: See TracChangeset for help on using the changeset viewer.