IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 15, 2007, 2:23:33 PM (19 years ago)
Author:
Paul Price
Message:

Adding --no-op option which turns off processing (so one can track only the database work flow) for everything except the phase 0 scripts (need to have some real data in the database in order to track it).

File:
1 edited

Legend:

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

    r11829 r11837  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update);
     35my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update, $no_op);
    3636GetOptions(
    3737    'det_id|d=s'        => \$det_id,
     
    4141    'dbname|d=s'        => \$dbname, # Database name
    4242    'workdir|w=s'       => \$workdir,   # Working directory, for output files
    43     'no-update'         => \$no_update
     43    'no-update'         => \$no_update,
     44    'no-op'             => \$no_op,
    4445) or pod2usage( 2 );
    4546
     
    104105        my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator
    105106        $stats->add_data(@backgrounds);
    106         $bg = $stats->mean();
    107         $bg_mean_stdev = $stats->standard_deviation() || 0.0;
     107        $bg = ($stats->mean() or 'NAN');
     108        $bg_mean_stdev = ($stats->standard_deviation() or 'NAN');
    108109    }
    109110    {
    110111        my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator
    111112        $stats->add_data(@variances);
    112         $bg_stdev = sqrt( $stats->mean() );
     113        $bg_stdev = (sqrt( $stats->mean() ) or 'NAN');
    113114    }
    114115}
     
    147148my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    148149
    149 # Make the jpeg for binning 1
    150 {
    151     my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE " . RECIPE1; # Command to run
    152     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    153         run(command => $command, verbose => 1);
    154     &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg1Name;
    155 }
    156 
    157 # Make the jpeg for binning 2
    158 {
    159     my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE " . RECIPE2; # Command to run
    160     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    161         run(command => $command, verbose => 1);
    162     &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg2Name;
     150unless ($no_op) {
     151    # Make the jpeg for binning 1
     152    {
     153        my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE " . RECIPE1; # Command to run
     154        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     155            run(command => $command, verbose => 1);
     156        &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg1Name;
     157    }
     158   
     159    # Make the jpeg for binning 2
     160    {
     161        my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE " . RECIPE2; # Command to run
     162        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     163            run(command => $command, verbose => 1);
     164        &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg2Name;
     165    }
    163166}
    164167
Note: See TracChangeset for help on using the changeset viewer.