IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13683


Ignore:
Timestamp:
Jun 6, 2007, 1:42:40 PM (19 years ago)
Author:
eugene
Message:

unifying, cleaning logfile output names

Location:
trunk
Files:
7 edited

Legend:

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

    r13639 r13683  
    138138# Output products
    139139$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    140 my $outputRoot = $ipprc->file_prepare( "$exp_tag.detresid.$det_id.$iter", $workdir, ${$files}[0]->{path_base} );
    141 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    142 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     140my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detresid.$det_id.$iter", $workdir, ${$files}[0]->{path_base} );
     141my $jpeg1Name  = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
     142my $jpeg2Name  = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     143my $logName    = $ipprc->filename("LOG.EXP", $outputRoot); # Name for log
     144
     145my $logFile;
     146unless ($no_op) {
     147    # XXX this will fail if the file exists (because of Nebulous rules)
     148    $logFile = $ipprc->file_create_open( $logName );
     149}
    143150
    144151# Recipes to use in processing
     
    189196my $reject_exp_bin_sn       = rejection_limit( 'EXP.BIN.SN',       $det_type, $filter );
    190197
    191 my $logName = caturi( $workdir, "$exp_tag.detreject.$det_id.$iter.log" ); # Name for log
    192 my $logFile;
    193 unless ($no_op) {
    194     # XXX this will fail if the file exists (because of Nebulous rules)
    195     $logFile = $ipprc->file_create_open( $logName );
    196 }
    197 
    198198# Reject based on the stats of the imfiles
    199199# it is VALID to reject on more than one criterion
  • trunk/ippScripts/scripts/detrend_resid.pl

    r13618 r13683  
    119119$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    120120
    121 my $outputRoot = $ipprc->file_prepare( "$exp_tag.detresid.$det_id.$iter", $workdir, $input_uri );
     121my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detresid.$det_id.$iter", $workdir, $input_uri );
    122122my $outputName = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id);
    123123my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id);
  • trunk/ippTasks/detrend.norm.pro

    r12697 r13683  
    164164
    165165    if ("$WORKDIR" == "NULL")
    166       $outroot = `pwd`
    167     else
    168       $outroot = `ipp_datapath.pl $WORKDIR`
    169     end
    170     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
    171     $logfile = $outroot/norm.$DET_ID.$ITERATION.log
     166      $outpath = `pwd`
     167    else
     168      $outpath = `ipp_datapath.pl $WORKDIR`
     169    end
     170    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID
     171    $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.log
    172172    stdout $logfile
    173173    stderr $logfile
    174     exec mkdir -p $outroot
     174    exec mkdir -p $outpath
    175175
    176176    $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE
     
    287287    # XXX use ipp_filename.pl to lookup output file names
    288288    if ("$WORKDIR" == "NULL")
    289       $outroot = `pwd`
    290     else
    291       $outroot = `ipp_datapath.pl $WORKDIR`
    292     end
    293     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
    294     $logfile = $outroot/norm.$DET_ID.$ITERATION.$CLASS_ID.log
     289      $outpath = `pwd`
     290    else
     291      $outpath = `ipp_datapath.pl $WORKDIR`
     292    end
     293    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID
     294    $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.$CLASS_ID.log
    295295    stdout $logfile
    296296    stderr $logfile
    297     exec mkdir -p $outroot
     297    exec mkdir -p $outpath
    298298
    299299    $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
     
    407407    # XXX add $WORKDIR/$LOG_DIR
    408408    if ("$WORKDIR" == "NULL")
    409       $outroot = `pwd`
    410     else
    411       $outroot = `ipp_datapath.pl $WORKDIR`
    412     end
    413     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
    414     $logfile = $outroot/norm.$DET_ID.$ITERATION.log
     409      $outpath = `pwd`
     410    else
     411      $outpath = `ipp_datapath.pl $WORKDIR`
     412    end
     413    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID
     414    $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.log
    415415    stdout $logfile
    416416    stderr $logfile
    417     exec mkdir -p $outroot
     417    exec mkdir -p $outpath
    418418
    419419    $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE
  • trunk/ippTasks/detrend.process.pro

    r13681 r13683  
    227227  task.exit    0
    228228    # convert 'stdout' to book format
    229     ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq -setword dbname $options:0
     229    ipptool2book stdout detPendingProcessedExp -key det_id:exp_tag -uniq -setword dbname $options:0
    230230    if ($VERBOSE > 2)
    231231      book listbook detPendingProcessedExp
     
    262262    if ($pageName == NULL) break
    263263
    264     # XXX is ITERATION relevant here??
    265264    book setword detPendingProcessedExp $pageName state RUN
    266265    book getword detPendingProcessedExp $pageName det_id    -var DET_ID
    267     book getword detPendingProcessedExp $pageName iteration -var ITERATION
    268266    book getword detPendingProcessedExp $pageName det_type  -var DET_TYPE
    269267    book getword detPendingProcessedExp $pageName exp_tag   -var EXP_TAG
     
    286284    end
    287285    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID/$EXP_TAG
    288     $outroot = $outpath/$EXP_TAG.detproc.$DET_ID.$ITERATION
     286    $outroot = $outpath/$EXP_TAG.detproc.$DET_ID
    289287    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    290288    if ("$logfile" == "")
  • trunk/ippTasks/detrend.reject.pro

    r12697 r13683  
    138138    end
    139139    $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
    140     $logfile = $outroot/reject.$DET_ID.$ITERATION.log
     140    $logfile = $outroot/$CAMERA.$DET_TYPE.$DET_ID.$ITERATION.detreject.log
    141141    stdout $logfile
    142142    stderr $logfile
  • trunk/ippTasks/detrend.resid.pro

    r12747 r13683  
    154154    # XXX use ipp_filename.pl to lookup output file names
    155155    if ("$WORKDIR" == "NULL")
    156       $outroot = `pwd`
    157     else
    158       $outroot = `ipp_datapath.pl $WORKDIR`
    159     end
    160     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID/$EXP_TAG
    161     $logfile = $outroot/detresid.$DET_ID.$ITERATION.$CLASS_ID.log
     156      $outpath = `pwd`
     157    else
     158      $outpath = `ipp_datapath.pl $WORKDIR`
     159    end
     160    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID/$EXP_TAG
     161    $outroot = $outpath/$EXP_TAG.detresid.$DET_ID.$ITERATION
     162    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
     163    if ("$logfile" == "")
     164      $logfile = $outroot.$CLASS_ID.log
     165    end
     166
    162167    stdout $logfile
    163168    stderr $logfile
    164     exec mkdir -p $outroot
     169    exec mkdir -p $outpath
    165170
    166171    $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE
     
    277282    # XXX use ipp_filename.pl to lookup output file names
    278283    if ("$WORKDIR" == "NULL")
    279       $outroot = `pwd`
    280     else
    281       $outroot = `ipp_datapath.pl $WORKDIR`
    282     end
    283     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID/$EXP_TAG
    284     $logfile = $outroot/detresid.$DET_ID.$ITERATION.log
     284      $outpath = `pwd`
     285    else
     286      $outpath = `ipp_datapath.pl $WORKDIR`
     287    end
     288    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID/$EXP_TAG
     289    $outroot = $outpath/$EXP_TAG.detresid.$DET_ID.$ITERATION
     290    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
     291
    285292    stdout $logfile
    286293    stderr $logfile
    287     exec mkdir -p $outroot
     294    exec mkdir -p $outpath
    288295
    289296    $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA
  • trunk/ippTasks/detrend.stack.pro

    r12697 r13683  
    134134
    135135    if ("$WORKDIR" == "NULL")
    136       $outroot = `pwd`
     136      $outpath = `pwd`
    137137    else
    138       $outroot = `ipp_datapath.pl $WORKDIR`
     138      $outpath = `ipp_datapath.pl $WORKDIR`
    139139    end
    140     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
    141     $logfile = $outroot/detstack.$DET_ID.$ITERATION.$CLASS_ID.log
     140    $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID
     141    $outroot = $outpath/$CAMERA.$DET_TYPE.$DET_ID.$ITERATION
     142    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
     143    if ("$logfile" == "")
     144      $logfile = $outroot.$CLASS_ID.log
     145    end
     146
    142147    stdout $logfile
    143148    stderr $logfile
    144     exec mkdir -p $outroot
     149    exec mkdir -p $outpath
    145150
    146151    # save the pageName for future reference below
Note: See TracChangeset for help on using the changeset viewer.