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_calc.pl

    r18362 r18562  
    2020use PS::IPP::Config 1.01 qw( :standard );
    2121
     22my $ipprc = PS::IPP::Config->new(); # IPP configuration
     23
    2224use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    2325use Pod::Usage qw( pod2usage );
    2426
    2527# Parse command-line arguments
    26 my ($det_id, $iter, $detType, $outroot, $dbname, $verbose, $no_update, $no_op);
     28my ($det_id, $iter, $detType, $outroot, $dbname, $verbose, $no_update, $no_op, $redirect );
    2729GetOptions(
    28         'det_id|d=s'    => \$det_id,    # Detrend id                         
    29         'iteration|i=s' => \$iter,      # Iteration                         
    30         'det_type|t=s'  => \$detType,   # Detrend type                       
    31         'outroot|w=s'   => \$outroot,   # output file base name
    32         'dbname|d=s'    => \$dbname,    # Database name                     
    33         'verbose'       => \$verbose,   # Print to stdout
    34         'no-update'     => \$no_update, # Don't update the database?         
    35         'no-op'         => \$no_op,     # Don't do operations               
    36         ) or pod2usage( 2 );
     30    'det_id|d=s'        => \$det_id,    # Detrend id                         
     31    'iteration|i=s'     => \$iter,      # Iteration                         
     32    'det_type|t=s'      => \$detType,   # Detrend type                       
     33    'outroot|w=s'       => \$outroot,   # output file base name
     34    'dbname|d=s'        => \$dbname,    # Database name                     
     35    'verbose'           => \$verbose,   # Print to stdout
     36    'no-update'         => \$no_update, # Don't update the database?         
     37    'no-op'             => \$no_op,     # Don't do operations               
     38    'redirect-output'   => \$redirect,
     39    ) or pod2usage( 2 );
    3740
    3841pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
     
    4447    defined $detType and
    4548    defined $outroot;
     49
     50my $logfile = $outroot . ".log";
     51
     52$ipprc->redirect_output($logfile) if $redirect;
    4653
    4754use constant STATISTIC => 'bg'; # Background statistic to use from the database
     
    225232        $command .= " -det_id $det_id";
    226233        $command .= " -iteration $iter";
     234        # XXX EAM : we should add this to the db : $command .= " -path_base $outroot";
    227235        $command .= " -code $exit_code";
    228236        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.