IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16308


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

Added verbose flags to scripts.

Location:
trunk/ippScripts/scripts
Files:
18 edited

Legend:

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

    r16247 r16308  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op);
     39my ( $exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $verbose, $no_update,
     40     $no_op );
    4041GetOptions(
    4142           'exp_tag=s'          => \$exp_tag, # Exposure identifier
     
    4748           'reduction=s'       => \$reduction, # Reduction class                       
    4849           'dvodb|w=s'         => \$dvodb,  # output DVO database
     50           'verbose'           => \$verbose,   # Print to stdout
    4951           'no-update'         => \$no_update, # Update the database?
    5052           'no-op'             => \$no_op, # Don't do any operations?
     
    129131    $command .= " -dbname $dbname" if defined $dbname;
    130132    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    131         run(command => $command, verbose => 1);
     133        run(command => $command, verbose => $verbose);
    132134    unless ($success) {
    133135        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    196198        my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    197199        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    198             run(command => $command, verbose => 1);
     200            run(command => $command, verbose => $verbose);
    199201        unless ($success) {
    200202            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    208210        my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    209211        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    210             run(command => $command, verbose => 1);
     212            run(command => $command, verbose => $verbose);
    211213        unless ($success) {
    212214            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    222224        my $command = "$ppConfigDump -camera $camera -dump-recipe PSASTRO -";
    223225        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    224             run(command => $command, verbose => 1);
     226            run(command => $command, verbose => $verbose);
    225227        unless ($success) {
    226228            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    244246            $command .= " -tracedest $traceDest -log $logDest";
    245247            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    246                 run(command => $command, verbose => 1);
     248                run(command => $command, verbose => $verbose);
    247249            unless ($success) {
    248250                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    274276
    275277            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    276                 run(command => $command, verbose => 1);
     278                run(command => $command, verbose => $verbose);
    277279            unless ($success) {
    278280                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    293295unless ($no_update) {
    294296    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    295         run(command => $fpaCommand, verbose => 1);
     297        run(command => $fpaCommand, verbose => $verbose);
    296298    unless ($success) {
    297299        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • 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);
  • trunk/ippScripts/scripts/detrend_correct_imfile.pl

    r15314 r16308  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     34my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction,
     35     $verbose, $no_update, $no_op );
    3536GetOptions(
    3637    'det_id|d=s'        => \$det_id,
     
    4546    'dbname|d=s'        => \$dbname, # Database name
    4647    'workdir|w=s'       => \$workdir, # Working directory, for output files
     48    'verbose'           => \$verbose,   # Print to stdout
    4749    'no-update'         => \$no_update,
    4850    'no-op'             => \$no_op,
     
    9193
    9294    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    93         run(command => $command, verbose => 1);
     95        run(command => $command, verbose => $verbose);
    9496    unless ($success) {
    9597        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    111113unless ($no_update) {
    112114    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    113         run(command => $command, verbose => 1);
     115        run(command => $command, verbose => $verbose);
    114116    unless ($success) {
    115117        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r16196 r16308  
    3333
    3434# Parse the command-line
    35 my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $no_update, $no_op);
     35my ( $det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $verbose,
     36     $no_update, $no_op );
    3637GetOptions(
    3738    'det_id|d=s'        => \$det_id,     # Detrend ID                           
     
    4445    'outroot|w=s'       => \$outroot,    # output file base name
    4546    'dbname|d=s'        => \$dbname,     # Database name                               
     47    'verbose'           => \$verbose,   # Print to stdout
    4648    'no-update'         => \$no_update,  # Don't update the database           
    4749    'no-op'             => \$no_op,      # Don't do any operations               
     
    117119
    118120    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    119         run(command => $command, verbose => 1);
     121        run(command => $command, verbose => $verbose);
    120122    unless ($success) {
    121123        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    160162unless ($no_update) {
    161163    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    162         run(command => $command, verbose => 1);
     164        run(command => $command, verbose => $verbose);
    163165    unless ($success) {
    164166        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • 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 {
  • trunk/ippScripts/scripts/detrend_norm_exp.pl

    r16196 r16308  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
     37my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, $no_op);
    3838GetOptions(
    3939           'det_id|d=s'        => \$det_id,
     
    4444           'dbname|d=s'        => \$dbname, # Database name
    4545           'reduction|=s'      => \$reduction,
     46           'verbose'           => \$verbose,   # Print to stdout
    4647           'no-update'         => \$no_update,
    4748           'no-op'             => \$no_op,
     
    9798    $command .= " -dbname $dbname" if defined $dbname;
    9899    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    99         run(command => $command, verbose => 1);
     100        run(command => $command, verbose => $verbose);
    100101    unless ($success) {
    101102        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    142143    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    143144    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    144         run(command => $command, verbose => 1);
     145        run(command => $command, verbose => $verbose);
    145146    &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($jpeg1Name);
    146147   
     
    148149    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    149150    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    150         run(command => $command, verbose => 1);
     151        run(command => $command, verbose => $verbose);
    151152    &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($jpeg2Name);
    152153
     
    165166unless ($no_update) {
    166167    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    167         run(command => $command, verbose => 1);
     168        run(command => $command, verbose => $verbose);
    168169    unless ($success) {
    169170        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r16196 r16308  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
     37my ( $det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $verbose, $no_update,
     38     $no_op );
    3839GetOptions(
    3940    'det_id|d=s'        => \$det_id,
     
    4546    'dbname|d=s'        => \$dbname, # Database name
    4647    'reduction|=s'      => \$reduction,
     48    'verbose'           => \$verbose,   # Print to stdout
    4749    'no-update'         => \$no_update,
    4850    'no-op'             => \$no_op,
     
    99101    $command .= " -dbname $dbname" if defined $dbname;
    100102    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    101         run(command => $command, verbose => 1);
     103        run(command => $command, verbose => $verbose);
    102104    unless ($success) {
    103105        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    145147    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    146148    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    147         run(command => $command, verbose => 1);
     149        run(command => $command, verbose => $verbose);
    148150    unless ($success) {
    149151        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    155157    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    156158    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    157         run(command => $command, verbose => 1);
     159        run(command => $command, verbose => $verbose);
    158160    unless ($success) {
    159161        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    174176unless ($no_update) {
    175177    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    176         run(command => $command, verbose => 1);
     178        run(command => $command, verbose => $verbose);
    177179    unless ($success) {
    178180        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r16209 r16308  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
     34my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction,
     35     $verbose, $no_update, $no_op );
    3536GetOptions(
    3637    'det_id|d=s'        => \$det_id,
     
    4445    'dbname|d=s'        => \$dbname, # Database name
    4546    'reduction=s'       => \$reduction, # Reduction class
     47    'verbose'           => \$verbose,   # Print to stdout
    4648    'no-update'         => \$no_update,
    4749    'no-op'             => \$no_op,
     
    113115
    114116    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    115         run(command => $command, verbose => 1);
     117        run(command => $command, verbose => $verbose);
    116118    unless ($success) {
    117119        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    152154unless ($no_update) {
    153155    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    154         run(command => $command, verbose => 1);
     156        run(command => $command, verbose => $verbose);
    155157    unless ($success) {
    156158        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r16196 r16308  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $no_update, $no_op);
     39my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $verbose, $no_update, $no_op);
    4040GetOptions(
    4141           'det_id|d=s'        => \$det_id,
     
    4343           'det_type|t=s'      => \$det_type,
    4444           'camera=s'          => \$camera,
    45            'outroot|w=s'   => \$outroot,   # output file base name
     45           'outroot|w=s'       => \$outroot,   # output file base name
    4646           'filter=s'          => \$filter,
    4747           'dbname|d=s'        => \$dbname, # Database name
     48           'verbose'           => \$verbose,   # Print to stdout
    4849           'no-update'         => \$no_update,
    4950           'no-op'             => \$no_op,
     
    106107    $command .= " -dbname $dbname" if defined $dbname;
    107108    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    108         run(command => $command, verbose => 1);
     109        run(command => $command, verbose => $verbose);
    109110    unless ($success) {
    110111        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    261262        # Update
    262263        ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    263             run(command => $command, verbose => 1);
     264            run(command => $command, verbose => $verbose);
    264265        unless ($success) {
    265266            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    308309unless ($no_update) {
    309310    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    310         run(command => $command, verbose => 1);
     311        run(command => $command, verbose => $verbose);
    311312    unless ($success) {
    312313        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_reject_imfile.pl

    r16196 r16308  
    4343
    4444# parse the command-line options
    45 my ($det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, $no_update, $no_op);
     45my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction,
     46     $verbose, $no_update, $no_op );
    4647GetOptions(
    4748           'det_id|d=s'        => \$det_id,
     
    5657           'dbname|d=s'        => \$dbname, # Database name
    5758           'reduction|=s'      => \$reduction,
     59           'verbose'           => \$verbose,   # Print to stdout
    5860           'no-update'         => \$no_update,
    5961           'no-op'             => \$no_op,
     
    124126    $command .= " -dbname $dbname" if defined $dbname;
    125127    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    126         run(command => $command, verbose => 1);
     128        run(command => $command, verbose => $verbose);
    127129    unless ($success) {
    128130        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    178180    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    179181    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    180         run(command => $command, verbose => 1);
     182        run(command => $command, verbose => $verbose);
    181183    unless ($success) {
    182184        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    188190    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    189191    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    190         run(command => $command, verbose => 1);
     192        run(command => $command, verbose => $verbose);
    191193    unless ($success) {
    192194        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    515517unless ($no_update) {
    516518    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    517         run(command => $command, verbose => 1);
     519        run(command => $command, verbose => $verbose);
    518520    unless ($success) {
    519521        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_resid.pl

    r16196 r16308  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, $dbname, $reduction, $no_update, $no_op);
     34my ( $det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot,
     35     $dbname, $reduction, $verbose, $no_update, $no_op );
    3536GetOptions(
    3637    'det_id|d=s'        => \$det_id,
     
    4748    'dbname|d=s'        => \$dbname, # Database name
    4849    'reduction=s'       => \$reduction, # Reduction class
     50    'verbose'           => \$verbose,   # Print to stdout
    4951    'no-update'         => \$no_update,
    5052    'no-op'             => \$no_op,
     
    162164
    163165    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    164         run(command => $command, verbose => 1);
     166        run(command => $command, verbose => $verbose);
    165167    unless ($success) {
    166168        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    188190    $command = "$ppStats -recipe PPSTATS RESIDUAL $bin2Name";
    189191    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    190         run(command => $command, verbose => 1);
     192        run(command => $command, verbose => $verbose);
    191193    unless ($success) {
    192194        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    217219unless ($no_update) {
    218220    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    219         run(command => $command, verbose => 1);
     221        run(command => $command, verbose => $verbose);
    220222    unless ($success) {
    221223        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/detrend_stack.pl

    r16196 r16308  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op, $quiet);
     35my ( $det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update,
     36     $no_op );
    3637GetOptions(
    3738    'det_id|d=s'        => \$det_id,
     
    4344    'dbname|d=s'        => \$dbname, # Database name
    4445    'reduction=s'       => \$reduction, # Reduction class for processing
     46    'verbose'           => \$verbose,   # Print to stdout
    4547    'no-update'         => \$no_update,
    4648    'no-op'             => \$no_op,
    47     'quiet'             => \$quiet,
    4849) or pod2usage( 2 );
    4950
     
    5758    defined $camera   and
    5859    defined $outroot;
    59 
    60 my $verbose = 1;
    61 if (defined $quiet) { $verbose = 0; }
    6260
    6361$ipprc->define_camera($camera);
  • trunk/ippScripts/scripts/diff_skycell.pl

    r16247 r16308  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($diff_id, $dbname, $workdir, $no_update, $no_op);
     35my ($diff_id, $dbname, $workdir, $verbose, $no_update, $no_op);
    3636GetOptions(
    3737    'diff_id|d=s'       => \$diff_id, # Diff identifier
    3838    'dbname|d=s'        => \$dbname, # Database name
    3939    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     40    'verbose'           => \$verbose,   # Print to stdout
    4041    'no-update'         => \$no_update, # Don't update the database?
    4142    'no-op'             => \$no_op, # Don't do any operations?
     
    7475    $command .= " -dbname $dbname" if defined $dbname;
    7576    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    76         run(command => $command, verbose => 1);
     77        run(command => $command, verbose => $verbose);
    7778    unless ($success) {
    7879        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    190191
    191192    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    192         run(command => $command, verbose => 1);
     193        run(command => $command, verbose => $verbose);
    193194    unless ($success) {
    194195        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    222223       
    223224        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    224             run(command => $command, verbose => 1);
     225            run(command => $command, verbose => $verbose);
    225226        unless ($success) {
    226227            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    235236
    236237        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    237             run(command => $command, verbose => 1);
     238            run(command => $command, verbose => $verbose);
    238239        unless ($success) {
    239240            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    255256        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -code $exit_code";
    256257        $command .= " -dbname $dbname" if defined $dbname;
    257         run(command => $command, verbose => 1);
     258        run(command => $command, verbose => $verbose);
    258259    }
    259260    exit $exit_code;
  • trunk/ippScripts/scripts/register_exp.pl

    r16196 r16308  
    3434    );
    3535
    36 my ($cache, $exp_id, $exp_tag, $dbname, $no_update, $no_op);
     36my ($cache, $exp_id, $exp_tag, $dbname, $verbose, $no_update, $no_op);
    3737GetOptions(
    3838    'caches'        => \$cache,
     
    4040    'exp_tag|t=s'   => \$exp_tag,
    4141    'dbname|d=s'    => \$dbname, # Database name   
     42    'verbose'       => \$verbose,   # Print to stdout
    4243    'no-update'     => \$no_update,
    4344    'no-op'         => \$no_op,
     
    126127    $command .= " -dbname $dbname" if defined $dbname;
    127128    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    128         cache_run(command => $command, verbose => 1);
     129        cache_run(command => $command, verbose => $verbose);
    129130    unless ($success) {
    130131        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    176177unless ($no_update) {
    177178    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    178         cache_run(command => $command, verbose => 1);
     179        cache_run(command => $command, verbose => $verbose);
    179180    unless ($success) {
    180181        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/register_imfile.pl

    r16196 r16308  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $no_update, $no_op);
     39my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $berbose, $no_update, $no_op);
    4040GetOptions(
    4141    'caches'           => \$cache,
     
    4545    'uri|u=s'          => \$uri,
    4646    'dbname|d=s'       => \$dbname,# Database name
     47    'verbose'          => \$verbose,   # Print to stdout
    4748    'no-update'        => \$no_update,
    4849    'no-op'            => \$no_op,
     
    130131
    131132my $now_time = localtime();
    132 printf STDERR "\nstarting ppStats: %s\n", $now_time;
     133printf STDERR "\nstarting ppStats: %s\n", $now_time if $verbose;
    133134
    134135# Run ppStats on the input file
     
    137138    my $command = "$ppStats $uri -recipe PPSTATS $RECIPE -level"; # Command to run ppStats
    138139    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    139         cache_run(command => $command, verbose => 1);
     140        cache_run(command => $command, verbose => $verbose);
    140141    unless ($success) {
    141142        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    157158
    158159$now_time = localtime();
    159 printf STDERR "\ndone with ppStats: %s\n", $now_time;
     160printf STDERR "\ndone with ppStats: %s\n", $now_time if $verbose;
    160161
    161162# we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type
     
    175176
    176177$now_time = localtime();
    177 printf STDERR "\nrunning regtool update: %s\n", $now_time;
     178printf STDERR "\nrunning regtool update: %s\n", $now_time if $verbose;
    178179
    179180# Push the results into the database
    180181unless ($no_update) {
    181182    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    182         run(command => $command, verbose => 1);
     183        run(command => $command, verbose => $verbose);
    183184    unless ($success) {
    184185        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    191192
    192193$now_time = localtime();
    193 printf STDERR "\ndone with regtool update: %s\n", $now_time;
     194printf STDERR "\ndone with regtool update: %s\n", $now_time if $verbose;
    194195
    195196sub cache_run
  • trunk/ippScripts/scripts/stack_skycell.pl

    r16247 r16308  
    3434use Pod::Usage qw( pod2usage );
    3535
    36 my ($stack_id, $dbname, $workdir, $no_update, $no_op, $save_temps);
     36my ($stack_id, $dbname, $workdir, $verbose, $no_update, $no_op, $save_temps);
    3737GetOptions(
    3838    'stack_id|d=s'      => \$stack_id, # Stack identifier
    3939    'dbname|d=s'        => \$dbname, # Database name
    4040    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     41    'verbose'           => \$verbose,   # Print to stdout
    4142    'no-update'         => \$no_update, # Don't update the database?
    4243    'no-op'             => \$no_op, # Don't do any operations?
     
    7677    $command .= " -dbname $dbname" if defined $dbname;
    7778    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    78         run(command => $command, verbose => 1);
     79        run(command => $command, verbose => $verbose);
    7980    unless ($success) {
    8081        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    181182    $command .= " -tracedest $traceDest -log $logDest";
    182183
    183     # print "\n\nWARNING: Convolving to 1 arcsec FWHM seeing!\n\n";
    184     print "\n\nWARNING: NOT Convolving!\n\n";
    185 
    186184    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    187         run(command => $command, verbose => 1);
     185        run(command => $command, verbose => $verbose);
    188186    unless ($success) {
    189187        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    217215       
    218216        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    219             run(command => $command, verbose => 1);
     217            run(command => $command, verbose => $verbose);
    220218        unless ($success) {
    221219            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    230228
    231229        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    232             run(command => $command, verbose => 1);
     230            run(command => $command, verbose => $verbose);
    233231        unless ($success) {
    234232            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
  • trunk/ippScripts/scripts/warp_overlap.pl

    r16020 r16308  
    3838my $ipprc = PS::IPP::Config->new(); # IPP configuration
    3939
    40 my ($warp_id, $camera, $dbname, $workdir, $no_update, $no_op);
     40my ($warp_id, $camera, $dbname, $workdir, $verbose, $no_update, $no_op);
    4141GetOptions(
    4242    'warp_id|i=s'       => \$warp_id, # Warp identifier
     
    4444    'dbname|d=s'        => \$dbname, # Database name
    4545    'workdir|w=s'       => \$workdir, # Working directory, for output files
     46    'verbose'           => \$verbose,   # Print to stdout
    4647    'no-update'         => \$no_update, # Don't update the database?
    4748    'no-op'             => \$no_op, # Don't do any operations
     
    7677    $command .= " -dbname $dbname" if defined $dbname;
    7778    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    78         run(command => $command, verbose => 1);
     79        run(command => $command, verbose => $verbose);
    7980    unless ($success) {
    8081        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    9596    my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -";
    9697    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    97         run(command => $command, verbose => 1);
     98        run(command => $command, verbose => $verbose);
    9899    unless ($success) {
    99100        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    122123       
    123124        my $tess_dir = $ipprc->convert_filename_absolute( $$tessellations{$tess_id} ); # Catdir for DVO
    124         print STDERR "tessellation: $tess_id, $tess_dir\n";
    125125       
    126126        my %unique_skycells = (); # Identified skycells (all unique by virtue of hash property)
     
    153153                }
    154154                my @matchlist = get_overlaps($astromFile, $tess_dir, $astromAccept); # List of overlaps
    155                 if (! @matchlist) {
     155                if (! @matchlist and $verbose) {
    156156                    print "skipping $astromFile\n";
    157157                }           
     
    206206   
    207207    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    208         run(command => $command, verbose => 1);
     208        run(command => $command, verbose => $verbose);
    209209    unless ($success) {
    210210        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    236236    $command .= ' -accept-astrom' if $accept;
    237237    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    238         run(command => $command, verbose => 1);
     238        run(command => $command, verbose => $verbose);
    239239    if (!$success) {
    240240        print "missing astrometry for $filename\n";
     
    273273       
    274274        $entry = $filename . '\[' . $extname . '\]';
    275         print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n";
     275        print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" if $verbose;
    276276    } else {
    277277        $entry = $filename;
    278         print STDERR "entry: $entry\n";
     278        print STDERR "entry: $entry\n" if $verbose;
    279279    }
    280280
    281281    my @skycells = &select_skycells($entry, @$matches); # Matching skycells
    282282    my $Nskycells = @skycells;
    283     printf STDERR "Nskycells: $Nskycells\n";
     283    printf STDERR "Nskycells: $Nskycells\n" if $verbose;
    284284    foreach my $skycell (@skycells) {
    285285        my %overlap = ();       # Overlap information for warptool
     
    291291        push @$overlaps, \%overlap;
    292292       
    293         printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id};
     293        printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id} if $verbose;
    294294       
    295295        $unique_skycells->{$skycell} = 1;
  • trunk/ippScripts/scripts/warp_skycell.pl

    r16247 r16308  
    3737my $ipprc = PS::IPP::Config->new(); # IPP configuration
    3838
    39 my ($warp_id, $skycell_id, $tess_id, $camera, $dbname, $workdir, $no_update, $no_op, $save_temps);
     39my ($warp_id, $skycell_id, $tess_id, $camera, $dbname, $workdir, $verbose, $no_update, $no_op, $save_temps);
    4040GetOptions(
    4141    'warp_id|i=s'       => \$warp_id, # Warp identifier
     
    4545    'dbname|d=s'        => \$dbname, # Database name
    4646    'workdir|w=s'       => \$workdir, # Working directory, for output files
     47    'verbose'           => \$verbose,   # Print to stdout
    4748    'no-update'         => \$no_update, # Don't update the database?
    4849    'no-op'             => \$no_op, # Don't do any operations?
     
    8889    $command .= " -dbname $dbname" if defined $dbname;
    8990    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    90         run(command => $command, verbose => 1);
     91        run(command => $command, verbose => $verbose);
    9192    unless ($success) {
    9293        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    105106    my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -";
    106107    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    107         run(command => $command, verbose => 1);
     108        run(command => $command, verbose => $verbose);
    108109    unless ($success) {
    109110        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    190191
    191192    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    192         run(command => $command, verbose => 1);
     193        run(command => $command, verbose => $verbose);
    193194    unless ($success) {
    194195        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    229230
    230231    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    231         run(command => $command, verbose => 1);
     232        run(command => $command, verbose => $verbose);
    232233    unless ($success) {
    233234        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    249250        my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code";
    250251        $command .= " -dbname $dbname" if defined $dbname;
    251         run(command => $command, verbose => 1);
     252        run(command => $command, verbose => $verbose);
    252253    }
    253254    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.