IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17624


Ignore:
Timestamp:
May 9, 2008, 3:59:32 PM (18 years ago)
Author:
eugene
Message:

generate logfile names in a consistent fashion with ipp_filename (expect register.pro)

Location:
trunk/ippTasks
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/chip.pro

    r17583 r17624  
    137137    set.host.for.camera $CAMERA $CLASS_ID
    138138
    139     # raw workdir examples:
     139    # set the WORKDIR variable
     140    set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     141
     142    # notes on how this works:
     143    # -- raw workdir examples:
    140144    # file://data/@HOST@.0/gpc1/20080130
    141145    # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
    142     set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    143     # out workdir examples:
     146    # -- out workdir examples:
    144147    # file://data/ipp004.0/gpc1/20080130
    145148    # neb:///ipp004-vol0/gpc1/20080130
  • trunk/ippTasks/detrend.correct.pro

    r16531 r17624  
    134134    book getword detPendingCorrectedImfile $pageName corr_id   -var CORR_ID
    135135    book getword detPendingCorrectedImfile $pageName corr_type -var CORR_TYPE
    136     book getword detPendingCorrectedImfile $pageName workdir   -var WORKDIR
     136    book getword detPendingCorrectedImfile $pageName workdir   -var WORKDIR_TEMPLATE
    137137    book getword detPendingCorrectedImfile $pageName dbname    -var DBNAME
    138138
     
    140140    set.host.for.camera $CAMERA $CLASS_ID
    141141
    142     ## output log filename
    143     if ("$WORKDIR" == "NULL")
    144       $outpath = `pwd`
    145     else
    146       $outpath = `ipp_datapath.pl $WORKDIR`
    147     end
    148     sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG
    149     sprintf outroot "%s/%s.detcorr.%s" $outpath $EXP_TAG $DET_ID
     142    # set the WORKDIR variable
     143    set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     144
     145    ## generate outroot specific to this exposure (& chip)
     146    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
     147
    150148    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    151149    if ("$logfile" == "")
    152       sprintf logfile "%s.%s.log" $outroot $CLASS_ID
     150      echo "WARNING: logfile not defined in detrend.correct.pro:150"
     151      break
    153152    end
    154153
    155154    stdout $logfile
    156155    stderr $logfile
    157     exec mkdir -p $outpath
     156    dirname $logfile -var outpath
     157
     158    # XXX I need to report the error if this fails...
     159    mkdir $outpath
    158160
    159161    $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
     
    261263    book getword detPendingCorrectedExp $pageName corr_id   -var CORR_ID
    262264    book getword detPendingCorrectedExp $pageName corr_type -var CORR_TYPE
    263     book getword detPendingCorrectedExp $pageName workdir   -var WORKDIR
     265    book getword detPendingCorrectedExp $pageName workdir   -var WORKDIR_TEMPLATE
    264266    book getword detPendingCorrectedExp $pageName dbname    -var DBNAME
    265267
     
    267269    set.host.for.camera $camera FPA
    268270
    269     # XXX push this into the filerules?
    270     if ("$WORKDIR" == "NULL")
    271       $outpath = `pwd`
    272     else
    273       $outpath = `ipp_datapath.pl $WORKDIR`
    274     end
    275     sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG
    276     sprintf outroot "%s/%s.detcorr.%s" $outpath $EXP_TAG $DET_ID
     271    # set workdir (interpolate host; see camera.pro for examples)
     272    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     273
     274    ## generate outroot specific to this exposure (& chip)
     275    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
     276
     277    ## generate output log based on filerule (convert the URI to a PATH)
    277278    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    278279    if ("$logfile" == "")
     
    282283    stdout $logfile
    283284    stderr $logfile
    284     exec mkdir -p $outpath
     285    dirname $logfile -var outpath
     286    mkdir $outpath
    285287
    286288    $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
  • trunk/ippTasks/detrend.norm.pro

    r16546 r17624  
    155155
    156156    ## generate output log
    157     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --basename $outroot --class_id fpa`
     157    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    158158
    159159    stdout $logfile
     
    388388
    389389    ## generate output log (NOT based on filerule?)
    390     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --basename $outroot --class_id fpa`
     390    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    391391
    392392    stdout $logfile
  • trunk/ippTasks/detrend.reject.pro

    r16558 r17624  
    124124
    125125    ## generate output log based on filerule (convert the URI to a PATH)
    126     $logfile = $outroot.log
    127     $logfile = `ipp_datapath.pl $logfile`
     126    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
     127    if ("$logfile" == "")
     128      echo "WARNING: logfile not defined in detrend.reject.pro:282"
     129      break
     130    end
    128131
    129132    stdout $logfile
  • trunk/ippTasks/register.pro

    r16300 r17624  
    140140    set.host.for.camera $TMP_CAMERA $TMP_CLASS_ID
    141141
    142     # raw workdir examples:
     142    # set the WORKDIR variable
     143    set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     144
     145    # notes on how this works:
     146    # -- raw workdir examples:
    143147    # file://data/@HOST@.0/gpc1/20080130
    144148    # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
    145     set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    146     # out workdir examples:
     149    # -- out workdir examples:
    147150    # file://data/ipp004.0/gpc1/20080130
    148151    # neb:///ipp004-vol0/gpc1/20080130
    149152
    150     ## generate output logfile name and convert URI to a PATH
    151     sprintf logfile "%s/%s/%s.%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG $TMP_CLASS_ID
     153    ## generate outroot specific to this exposure (& chip)
     154    sprintf logfile "%s/%s/%s.reg.%s.log" $WORKDIR $EXP_TAG $EXP_TAG $TMP_CLASS_ID
     155
     156    ## generate output log based on filerule (convert the URI to a PATH)
     157    ## note that we use ipp_datapath here not ipp_filename because the CAMERA name is not yet controlled
    152158    $logfile = `ipp_datapath.pl $logfile`
     159    if ("$logfile" == "")
     160      echo "WARNING: logfile not defined in register.pro:160"
     161      break
     162    end
    153163
    154164    stdout $logfile
     
    261271    set.host.for.camera $TMP_CAMERA $TMP_CLASS_ID
    262272
    263     # raw workdir examples:
     273    # set the WORKDIR variable
     274    set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     275
     276    # notes on how this works:
     277    # -- raw workdir examples:
    264278    # file://data/@HOST@.0/gpc1/20080130
    265279    # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
    266     set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    267     # out workdir examples:
     280    # -- out workdir examples:
    268281    # file://data/ipp004.0/gpc1/20080130
    269282    # neb:///ipp004-vol0/gpc1/20080130
     
    271284    ## generate output log based on filerule
    272285    sprintf logfile "%s/%s/%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG
     286
     287    ## generate output log based on filerule (convert the URI to a PATH)
     288    ## note that we use ipp_datapath here not ipp_filename because the CAMERA name is not yet controlled
    273289    $logfile = `ipp_datapath.pl $logfile`
     290    if ("$logfile" == "")
     291      echo "WARNING: logfile not defined in register.pro:291"
     292      break
     293    end
    274294
    275295    stdout $logfile
  • trunk/ippTasks/stack.pro

    r17415 r17624  
    128128    sprintf outroot "%s/tess_%s/%s/%s.%s.stk.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $STACK_ID
    129129
    130     ## generate output log based on filerule (convert the URI to a PATH)
     130    ## generate output log based on filerule (convert the URI to a PATH) (use STACK_ID?)
    131131#    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id $STACK_ID --basename $outroot`
    132     $logfile = `ipp_datapath.pl $outroot.pantasks.log`
     132    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
     133    if ("$logfile" == "")
     134      echo "WARNING: logfile not defined in stack.pro:136"
     135      break
     136    end
    133137
    134138    stdout $logfile
Note: See TracChangeset for help on using the changeset viewer.