IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 15, 2008, 10:33:17 AM (18 years ago)
Author:
eugene
Message:

implement redirect-output everywhere; cleanup logfile names; rename detrend_resid.pl to detrend_resid_imfile.pl; rename detrend_reject_imfile.pl to detrend_resid_exp.pl

File:
1 edited

Legend:

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

    r17943 r18562  
    2626use Pod::Usage qw( pod2usage );
    2727
    28 my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, $no_op, $save_temps);
     28my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, $no_op, $redirect, $save_temps);
    2929GetOptions(
    30            'det_id|d=s'        => \$det_id,
    31            'iteration|i=s'     => \$iter,
    32            'camera|c=s'        => \$camera,
    33            'det_type|t=s'      => \$det_type,
    34            'outroot|w=s'       => \$outroot,   # output file base name
    35            'dbname|d=s'        => \$dbname, # Database name
    36            'reduction|=s'      => \$reduction,
    37            'verbose'           => \$verbose,   # Print to stdout
    38            'no-update'         => \$no_update,
    39            'no-op'             => \$no_op,
    40            'save-temps'        => \$save_temps, # Save temporary files?
    41            ) or pod2usage( 2 );
     30    'det_id|d=s'        => \$det_id,
     31    'iteration|i=s'     => \$iter,
     32    'camera|c=s'        => \$camera,
     33    'det_type|t=s'      => \$det_type,
     34    'outroot|w=s'       => \$outroot,   # output file base name
     35    'dbname|d=s'        => \$dbname, # Database name
     36    'reduction|=s'      => \$reduction,
     37    'verbose'           => \$verbose,   # Print to stdout
     38    'no-update'         => \$no_update,
     39    'no-op'             => \$no_op,
     40    'redirect-output'   => \$redirect,
     41    'save-temps'        => \$save_temps, # Save temporary files?
     42    ) or pod2usage( 2 );
    4243
    4344pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
     
    4950    defined $det_type and
    5051    defined $outroot;
     52
     53my $logfile = $outroot . ".log";
     54
     55$ipprc->redirect_output($logfile) if $redirect;
    5156
    5257$ipprc->define_camera($camera);
     
    8792my ($files, $command, $success, $error_code, $full_buf, $stdout_buf, $stderr_buf);
    8893{
    89     $command  = "$dettool -normalizedimfile -det_id $det_id -iteration $iter"; # Command to run
     94    $command  = "$dettool -normalizedimfile"; # Command to run
     95    $command .= " -det_id $det_id";
     96    $command .= " -iteration $iter";
    9097    $command .= " -dbname $dbname" if defined $dbname;
    9198    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    181188        $command .= " -det_id $det_id";
    182189        $command .= " -iteration $iter";
     190        $command .= " -path_base $outroot ";
    183191        $command .= " -code $exit_code";
    184192        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.