IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18048


Ignore:
Timestamp:
Jun 10, 2008, 8:46:59 AM (18 years ago)
Author:
bills
Message:

Resolve log file and redirect output in scripts not in tasks

Location:
trunk
Files:
12 edited

Legend:

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

    r17671 r18048  
    2525
    2626my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction,
    27      $verbose, $no_update, $no_op );
     27     $verbose, $no_update, $no_op, $outroot, $redirect, $corr_id, $corr_type, $corr_uri );
    2828GetOptions(
    2929    'det_id|d=s'        => \$det_id,
     
    4141    'no-update'         => \$no_update,
    4242    'no-op'             => \$no_op,
     43    'outroot'           => \$outroot,
     44    'redirect-output'   => \$redirect,
    4345) or pod2usage( 2 );
    4446
     
    5658# XXX this exits with status = 0 on failure
    5759$ipprc->define_camera($camera);
     60
     61if ($redirect) {
     62    die "must suplly --outroot with --redirect-output" if !defined ($outroot);
     63    my $logDest     = $ipprc->filename("LOG.IMFILE", $outroot, $class_id)
     64       or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     65    $ipprc->redirect_output($logDest);
     66}
    5867
    5968# Recipes to use as a function of detrend type
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r17943 r18048  
    2626# Parse the command-line
    2727my ( $det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $verbose,
    28      $no_update, $no_op );
     28     $no_update, $no_op, $redirect );
    2929GetOptions(
    3030    'det_id|d=s'        => \$det_id,     # Detrend ID
     
    4040    'no-update'         => \$no_update,  # Don't update the database
    4141    'no-op'             => \$no_op,      # Don't do any operations
     42    'redirect-output'   => \$redirect,   # send output from script to LOG.IMFILE
    4243    ) or pod2usage( 2 );
    4344
     
    5657$ipprc->define_camera($camera);
    5758
     59my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id)
     60        or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     61$ipprc->redirect_output($logDest) if $redirect;
     62
    5863my $RECIPE_PPIMAGE = 'PPIMAGE_N'; # Recipe to use with ppImage
    5964my $RECIPE_PPSTATS = 'CHIPSTATS'; # Recipe to use with ppStats
     
    100105my $statsName = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
    101106my $traceDest = $ipprc->filename("TRACE.IMFILE",  $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
    102 my $logDest   = $ipprc->filename("LOG.IMFILE",    $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
    103107
    104108# Run normalisation
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r17943 r18048  
    2727
    2828my ( $det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $verbose, $no_update,
    29      $no_op, $save_temps );
     29     $no_op, $save_temps, $redirect );
    3030GetOptions(
    3131    'det_id|d=s'        => \$det_id,
     
    4141    'no-op'             => \$no_op,
    4242    'save-temps'        => \$save_temps, # Save temporary files?
     43    'redirect-output'   => \$redirect,
    4344) or pod2usage( 2 );
    4445
     
    5455
    5556$ipprc->define_camera($camera);
     57
     58if ($redirect) {
     59    my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE")
     60        or &my_die("Missing entry in file rules", $det_id, $exp_id, $PS_EXIT_CONFIG_ERROR);
     61    $ipprc->redirect_output($logDest);
     62}
    5663
    5764# Recipes to use based on reduction class
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r17971 r18048  
    2525
    2626my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction,
    27      $verbose, $no_update, $no_op );
     27     $verbose, $no_update, $no_op, $redirect );
    2828GetOptions(
    2929    'det_id|d=s'        => \$det_id,
     
    4040    'no-update'         => \$no_update,
    4141    'no-op'             => \$no_op,
     42    'redirect-output'   => \$redirect,
    4243) or pod2usage( 2 );
    4344
     
    5657# XXX this exits with status = 0 on failure
    5758$ipprc->define_camera($camera);
     59
     60my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id)
     61      or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     62
     63$ipprc->redirect_output($logDest) if $redirect;
    5864
    5965# Recipes to use as a function of detrend type
     
    95101my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    96102my $traceDest   = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    97 my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    98 
    99103# Run ppImage
    100104unless ($no_op) {
  • trunk/ippScripts/scripts/detrend_reject_imfile.pl

    r17943 r18048  
    3636# parse the command-line options
    3737my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction,
    38      $verbose, $no_update, $no_op, $save_temps );
     38     $verbose, $no_update, $no_op, $save_temps, $redirect );
    3939GetOptions(
    4040           'det_id|d=s'        => \$det_id,
     
    5353           'no-op'             => \$no_op,
    5454           'save-temps'        => \$save_temps, # Save temporary files?
     55           'redirect-output'   => \$redirect,   # redirect output from LOG.IMFILE
    5556           ) or pod2usage( 2 );
    5657
     
    6869# load IPP config information for the specified camera
    6970$ipprc->define_camera($camera);
     71if ($redirect) {
     72    # XXX should this really be going to LOG.IMFILE?
     73    # That's where detrend.resid.pro was sending it
     74    my $logDest     = $ipprc->filename("LOG.IMFILE", $outroot, "NONE")
     75       or &my_die("Missing entry from camera config", $det_id, $iter, $exp_id, $PS_EXIT_CONFIG_ERROR);
     76    $ipprc->redirect_output($logDest);
     77}
     78
    7079
    7180# Recipes to use based on reduction class
  • trunk/ippScripts/scripts/detrend_resid.pl

    r17971 r18048  
    2525
    2626my ( $det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot,
    27      $dbname, $reduction, $verbose, $no_update, $no_op );
     27     $dbname, $reduction, $verbose, $no_update, $no_op, $redirect );
    2828GetOptions(
    2929    'det_id|d=s'        => \$det_id,
     
    4343    'no-update'         => \$no_update,
    4444    'no-op'             => \$no_op,
     45    'redirect-output'   => \$redirect,
    4546) or pod2usage( 2 );
    4647
     
    6162
    6263$ipprc->define_camera($camera);
     64my $logDest     = $ipprc->filename("LOG.IMFILE", $outroot, $class_id);
     65if ($redirect) {
     66    $ipprc->redirect_output($logDest);
     67}
    6368
    6469# Recipes to use as a function of detrend type and mode
     
    137142my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id);
    138143my $traceDest   = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id);
    139 my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id);
    140144
    141145# Run ppImage & ppStats
  • trunk/ippScripts/scripts/detrend_stack.pl

    r17941 r18048  
    1818use PS::IPP::Metadata::Stats;
    1919use PS::IPP::Metadata::List qw( parse_md_list );
    20 use File::Temp qw( tempfile );
    2120use PS::IPP::Config 1.01 qw( :standard );
    2221
     
    2726
    2827my ( $det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $save_temps,
    29      $no_update, $no_op );
     28     $no_update, $no_op, $redirect );
    3029GetOptions(
    3130    'det_id|d=s'        => \$det_id,
     
    3534    'camera|c=s'        => \$camera,
    3635    'outroot|w=s'       => \$outroot,   # output file base name
    37     'dbname|d=s'        => \$dbname, # Database name
     36    'dbname|d=s'        => \$dbname,    # Database name
    3837    'reduction=s'       => \$reduction, # Reduction class for processing
    3938    'verbose'           => \$verbose,   # Print to stdout
     
    4140    'no-update'         => \$no_update,
    4241    'no-op'             => \$no_op,
     42    'redirect-output'   => \$redirect,
    4343) or pod2usage( 2 );
     44
    4445
    4546pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
     
    5556$ipprc->define_camera($camera);
    5657$det_type = uc($det_type);
     58
     59my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id)
     60    or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     61
     62# optionally redirect the outputs from this script to LOG.IMFILE
     63$ipprc->redirect_output($logDest) if $redirect;
    5764
    5865# Recipes to use as a function of detrend type
     
    121128
    122129# Generate MDC file with the inputs
    123 my ($listFile, $listName) = tempfile( $ipprc->file_resolve("$outroot.$class_id.list.XXXX"), UNLINK => !$save_temps );
     130my ($listFile, $listName) = $ipprc->create_temp_file("$outroot.$class_id.list", $save_temps);
     131
    124132my $num = 0;
    125133foreach my $file (@$files) {
     
    161169my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Statistics name
    162170my $traceDest   = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Trace messages
    163 my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Log messages
    164171
    165172$command = "$ppMerge $listName $outroot"; # Command to run
  • trunk/ippTasks/detrend.correct.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingCorrectedImfile
     
    7168
    7269  stdout NULL
    73   stderr $LOGSUBDIR/detcorr.imfile.log
     70  stderr $LOGDIR/detcorr.load.log
    7471
    7572  task.exec
     
    146143    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
    147144
    148     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    149     if ("$logfile" == "")
    150       echo "WARNING: logfile not defined in detrend.correct.pro:150"
    151       break
    152     end
    153 
    154     stdout $logfile
    155     stderr $logfile
    156     dirname $logfile -var outpath
    157 
    158     # XXX I need to report the error if this fails...
    159     mkdir $outpath
    160 
    161     $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
     145    stdout $LOGDIR/detcorr.run.log
     146    stderr $LOGDIR/detcorr.run.log
     147
     148    $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --outroot $outroot --redirect-output
    162149    if ("$WORKDIR" != "NULL")
    163150      $run = $run --workdir $WORKDIR
     
    202189
    203190  stdout NULL
    204   stderr $LOGSUBDIR/detcorr.exp.log
     191  stderr $LOGDIR/detcorr.exp.load.log
    205192
    206193  task.exec
     
    275262    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
    276263
    277     ## generate output log based on filerule (convert the URI to a PATH)
    278     $logfile = `ipp_filename.pl --touch --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    279     if ("$logfile" == "")
    280       $logfile = $outroot.log
    281     end
    282 
    283     stdout $logfile
    284     stderr $logfile
    285     dirname $logfile -var outpath
    286     mkdir $outpath
    287 
    288     $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
     264    stdout $LOGDIR/detcorr.exp.run.log
     265    stderr $LOGDIR/detcorr.exp.run.log
     266
     267    $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --redirect-output
     268
    289269    if ("$WORKDIR" != "NULL")
    290270      $run = $run --workdir $WORKDIR
  • trunk/ippTasks/detrend.norm.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingNormStatImfile
     
    8481
    8582  stdout NULL
    86   stderr $LOGSUBDIR/detrend.normstat.log
     83  stderr $LOGDIR/detrend.normstat.load.log
    8784
    8885  task.exec
     
    199196
    200197  stdout NULL
    201   stderr $LOGSUBDIR/detrend.norm.log
     198  stderr $LOGDIR/detrend.norm.load.log
    202199
    203200  task.exec
     
    272269    sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION
    273270
    274     ## generate output log
    275     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    276 
    277     stdout $logfile
    278     stderr $logfile
    279     dirname $logfile -var outpath
    280     mkdir $outpath
    281 
    282     $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot
     271    stdout $LOGDIR/detrend.norm.run.log
     272    stderr $LOGDIR/detrend.norm.run.log
     273
     274    $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot --redirect-output
    283275    add_standard_args run
    284276   
     
    317309
    318310  stdout NULL
    319   stderr $LOGSUBDIR/detrend.normexp.log
     311  stderr $LOGDIR/detrend.normexp.load.log
    320312
    321313  task.exec
  • trunk/ippTasks/detrend.process.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingProcessedImfile
     
    7168
    7269  stdout NULL
    73   stderr $LOGSUBDIR/detproc.imfile.log
     70  stderr $LOGDIR/detproc.imfile.load.log
    7471
    7572  task.exec
     
    152149    end
    153150
    154     stdout $logfile
    155     stderr $logfile
     151    stdout $LOGDIR/detproc.imfile.run.log
     152    stderr $LOGDIR/detproc.imfile.run.log
    156153    dirname $logfile -var outpath
    157154
     
    159156    mkdir $outpath
    160157
    161     $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot
     158    $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot --redirect-output
    162159    if ("$REDUCTION" != "NULL")
    163160      $run = $run --reduction $REDUCTION
     
    199196
    200197  stdout NULL
    201   stderr $LOGSUBDIR/detproc.exp.log
     198  stderr $LOGDIR/detproc.exp.load.log
    202199
    203200  task.exec
     
    271268    sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
    272269
    273     ## generate output log based on filerule (convert the URI to a PATH)
    274     $logfile = `ipp_filename.pl --touch --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    275     if ("$logfile" == "")
    276       echo "WARNING: logfile not defined in detrend.process.pro:282"
    277       break
    278     end
    279 
    280     stdout $logfile
    281     stderr $logfile
    282     dirname $logfile -var outpath
    283     mkdir $outpath
    284 
    285     $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
     270    stdout $LOGDIR/detproc.exp.run.log
     271    stderr $LOGDIR/detproc.exp.run.log
     272
     273    $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
    286274    if ("$REDUCTION" != "NULL")
    287275      $run = $run --reduction $REDUCTION
  • trunk/ippTasks/detrend.resid.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingResidImfile
     
    6865
    6966  stdout NULL
    70   stderr $LOGSUBDIR/detresid.log
     67  stderr $LOGDIR/detresid.load.log
    7168
    7269  task.exec
     
    145142    sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION
    146143
    147     ## generate output log based on filerule (convert the URI to a PATH)
    148     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    149     if ("$logfile" == "")
    150       echo "WARNING: logfile not defined in detrend.resid.pro:161"
    151       break
    152     end
    153 
    154     stdout $logfile
    155     stderr $logfile
    156     dirname $logfile -var outpath
    157     mkdir $outpath
    158 
    159     $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot
     144    stdout $LOGDIR/detresid.run.log
     145    stderr $LOGDIR/detresid.run.log
     146
     147    $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot --redirect-output
    160148    if ("$REDUCTION" != "NULL")
    161149      $run = $run --reduction $REDUCTION
     
    197185
    198186  stdout NULL
    199   stderr $LOGSUBDIR/detresid.exp.log
     187  stderr $LOGDIR/detresid.exp.load.log
    200188
    201189  task.exec
     
    271259    sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION
    272260
    273     ## generate output log based on filerule (convert the URI to a PATH)
    274     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id NONE --basename $outroot`
    275     if ("$logfile" == "")
    276       echo "WARNING: logfile not defined in detrend.process.pro:285"
    277       break
    278     end
    279 
    280     stdout $logfile
    281     stderr $logfile
    282     dirname $logfile -var outpath
    283     mkdir $outpath
    284 
    285     $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
     261    stdout $LOGDIR/detresid.exp.run.log
     262    stderr $LOGDIR/detresid.exp.run.log
     263
     264    $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
    286265    add_standard_args run
    287266
  • trunk/ippTasks/detrend.stack.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingStackedImfile
     
    5350
    5451  stdout NULL
    55   stderr $LOGSUBDIR/detstack.log
     52  stderr $LOGDIR/detrend.stack.load.log
    5653
    5754  task.exec
     
    125122    sprintf outroot "%s/%s.%s.%s/%s.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION
    126123
    127     ## generate output log based on filerule (convert the URI to a PATH)
    128     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    129     if ("$logfile" == "")
    130       echo "WARNING: logfile not defined in detrend.stack.pro:141"
    131       break
    132     end
     124    stdout $LOGDIR/detrend.stack.run.log
     125    stderr $LOGDIR/detrend.stack.run.log
    133126
    134     stdout $logfile
    135     stderr $logfile
    136     dirname $logfile -var outpath
    137     mkdir $outpath
    138 
    139     $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
     127    $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
    140128    if ("$REDUCTION" != "NULL")
    141129      $run = $run --reduction $REDUCTION
Note: See TracChangeset for help on using the changeset viewer.