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

    r18360 r18562  
    2727
    2828my ( $exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $verbose, $no_update,
    29      $no_op, $save_temps );
     29     $no_op, $redirect, $save_temps );
    3030GetOptions(
    31            'exp_tag=s'          => \$exp_tag, # Exposure identifier
    32            'cam_id=s'          => \$cam_id, # Camtool identifier
    33            'recipe=s'          => \$recipe, # Recipe to use
    34            'camera|c=s'        => \$camera, # Camera
    35            'dbname|d=s'        => \$dbname, # Database name
    36            'outroot|w=s'       => \$outroot, # output file base name
    37            'reduction=s'       => \$reduction, # Reduction class
    38            'dvodb|w=s'         => \$dvodb,  # output DVO database
    39            'verbose'           => \$verbose,   # Print to stdout
    40            'no-update'         => \$no_update, # Update the database?
    41            'no-op'             => \$no_op, # Don't do any operations?
    42            'save-temps'        => \$save_temps, # Save temporary files?
    43            ) or pod2usage( 2 );
     31    'exp_tag=s'          => \$exp_tag, # Exposure identifier
     32    'cam_id=s'          => \$cam_id, # Camtool identifier
     33    'recipe=s'          => \$recipe, # Recipe to use
     34    'camera|c=s'        => \$camera, # Camera
     35    'dbname|d=s'        => \$dbname, # Database name
     36    'outroot|w=s'       => \$outroot, # output file base name
     37    'reduction=s'       => \$reduction, # Reduction class
     38    'dvodb|w=s'         => \$dvodb,  # output DVO database
     39    'verbose'           => \$verbose,   # Print to stdout
     40    'no-update'         => \$no_update, # Update the database?
     41    'no-op'             => \$no_op, # Don't do any operations?
     42    'redirect-output'   => \$redirect,
     43    'save-temps'        => \$save_temps, # Save temporary files?
     44    ) or pod2usage( 2 );
    4445
    4546pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
     
    5455
    5556$ipprc->define_camera($camera);
     57
     58my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     59
     60$ipprc->redirect_output($logDest) if $redirect;
    5661
    5762# Recipes to use based on reduction class
     
    185190my $fpaStats   = $ipprc->filename("PSASTRO.STATS",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
    186191my $traceDest  = $ipprc->filename("TRACE.EXP",          $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
    187 my $logDest    = $ipprc->filename("LOG.EXP",            $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
    188192
    189193# convert supplied DVO database name to UNIX filename
     
    320324    carp($msg);
    321325    if (defined $cam_id and not $no_update) {
    322         my $command = "$camtool -addprocessedexp -cam_id $cam_id -uri UNKNOWN -code $exit_code";
     326        my $command = "$camtool -addprocessedexp";
     327        $command .= " -cam_id $cam_id";
     328        $command .= " -uri UNKNOWN";
     329        $command .= " -code $exit_code";
     330        $command .= " -path_base $outroot";
    323331        $command .= " -hostname $host" if defined $host;
    324332        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.