IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2008, 5:35:42 PM (18 years ago)
Author:
eugene
Message:

updates from eam_branch_20080121

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/detrend.stack.pro

    r16173 r16195  
    123123    book getword detPendingStackedImfile $pageName class_id  -var CLASS_ID
    124124    book getword detPendingStackedImfile $pageName camera    -var CAMERA 
    125     book getword detPendingStackedImfile $pageName workdir   -var WORKDIR
     125    book getword detPendingStackedImfile $pageName workdir   -var WORKDIR_TEMPLATE
    126126    book getword detPendingStackedImfile $pageName dbname    -var DBNAME
    127127    book getword detPendingStackedImfile $pageName reduction -var REDUCTION
     
    130130    set.host.for.camera $camera $class_id
    131131
    132     if ("$WORKDIR" == "NULL")
    133       $outpath = `pwd`
    134     else
    135       $outpath = `ipp_datapath.pl $WORKDIR`
    136     end
    137     sprintf outpath "%s/%s.%s.%s" $outpath $CAMERA $DET_TYPE $DET_ID
    138     sprintf outroot "%s/%s.%s.%s.%s" $outpath $CAMERA $DET_TYPE $DET_ID $ITERATION
     132    # set workdir (interpolate host; see camera.pro for examples)
     133    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     134
     135    ## generate outroot specific to this exposure (& chip)
     136    sprintf outroot "%s/%s.%s.%s/%s.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION
     137
     138    ## generate output log based on filerule (convert the URI to a PATH)
    139139    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    140140    if ("$logfile" == "")
    141       sprintf logfile "%s.%s.log" $outroot $CLASS_ID
     141      echo "WARNING: logfile not defined in detrend.stack.pro:141"
     142      break
    142143    end
    143144
    144145    stdout $logfile
    145146    stderr $logfile
    146     exec mkdir -p $outpath
    147147
    148     # save the pageName for future reference below
    149     options $pageName
    150 
    151     $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA
    152     if ("$WORKDIR" != "NULL")
    153       $run = $run --workdir $WORKDIR
    154     end
     148    $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
    155149    if ("$REDUCTION" != "NULL")
    156150      $run = $run --reduction $REDUCTION
    157151    end
    158152    add_standard_args run
     153
     154    # save the pageName for future reference below
     155    options $pageName
    159156
    160157    # create the command line
Note: See TracChangeset for help on using the changeset viewer.