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.process.pro

    r16173 r16195  
    143143    book getword detPendingProcessedImfile $pageName uri      -var URI     
    144144    book getword detPendingProcessedImfile $pageName camera   -var CAMERA   
    145     book getword detPendingProcessedImfile $pageName workdir  -var WORKDIR
     145    book getword detPendingProcessedImfile $pageName workdir  -var WORKDIR_TEMPLATE
    146146    book getword detPendingProcessedImfile $pageName dbname   -var DBNAME
    147147    book getword detPendingProcessedImfile $pageName reduction -var REDUCTION
     
    150150    set.host.for.camera $camera $class_id
    151151
    152     ## output log filename
    153     if ("$WORKDIR" == "NULL")
    154       $outpath = `pwd`
    155     else
    156       $outpath = `ipp_datapath.pl $WORKDIR`
    157     end
    158     sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG
    159     sprintf outroot "%s/%s.detproc.%s" $outpath $EXP_TAG $DET_ID
     152    # see chip.pro for examples
     153    set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     154
     155    ## generate outroot specific to this exposure (& chip)
     156    sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
     157
     158    ## generate output log based on filerule (convert the URI to a PATH)
    160159    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    161160    if ("$logfile" == "")
    162       sprintf logfile "%s.%s.log" $outroot $CLASS_ID
     161      echo "WARNING: logfile not defined in detrend.process.pro:161"
     162      break
    163163    end
    164164
    165165    stdout $logfile
    166166    stderr $logfile
    167     exec mkdir -p $outpath
    168 
    169     $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
    170     if ("$WORKDIR" != "NULL")
    171       $run = $run --workdir $WORKDIR
    172     end
     167
     168    $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
    173169    if ("$REDUCTION" != "NULL")
    174170      $run = $run --reduction $REDUCTION
     
    269265    book getword detPendingProcessedExp $pageName camera    -var CAMERA 
    270266    book getword detPendingProcessedExp $pageName exp_tag   -var EXP_TAG
    271     book getword detPendingProcessedExp $pageName workdir   -var WORKDIR
     267    book getword detPendingProcessedExp $pageName workdir   -var WORKDIR_TEMPLATE
    272268    book getword detPendingProcessedExp $pageName dbname    -var DBNAME
     269    book getword detPendingProcessedExp $pageName reduction -var REDUCTION
    273270
    274271    # specify choice of local or remote host based on camera and chip (class_id)
    275272    set.host.for.camera $camera FPA
    276273
    277     # XXX push this into the filerules?
    278     if ("$WORKDIR" == "NULL")
    279       $outpath = `pwd`
    280     else
    281       $outpath = `ipp_datapath.pl $WORKDIR`
    282     end
    283     sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG
    284     sprintf outroot "%s/%s.detproc.%s" $outpath $EXP_TAG $DET_ID
     274    # set workdir (interpolate host; see camera.pro for examples)
     275    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     276
     277    ## generate outroot specific to this exposure (& chip)
     278    sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
     279
     280    ## generate output log based on filerule (convert the URI to a PATH)
    285281    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    286282    if ("$logfile" == "")
    287       $logfile = $outroot.log
     283      echo "WARNING: logfile not defined in detrend.process.pro:282"
     284      break
    288285    end
    289286
    290287    stdout $logfile
    291288    stderr $logfile
    292     exec mkdir -p $outpath
    293 
    294     $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA
    295     if ("$WORKDIR" != "NULL")
    296       $run = $run --workdir $WORKDIR
     289
     290    $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
     291    if ("$REDUCTION" != "NULL")
     292      $run = $run --reduction $REDUCTION
    297293    end
    298294    add_standard_args run
Note: See TracChangeset for help on using the changeset viewer.