IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12697


Ignore:
Timestamp:
Mar 30, 2007, 1:09:39 PM (19 years ago)
Author:
Paul Price
Message:

Changing set_standard_args to employ a filtering approach --- it supplements the command-line instead of providing something that gets added on. Needed to do this because wanted the arguments it provides to be optional, and it really doesn't like to have a zero length string as an argument.

Location:
trunk/ippTasks
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/camera.pro

    r12371 r12697  
    122122    book getword camPendingExp $pageName workdir -var WORKDIR
    123123    book getword camPendingExp $pageName dbname -var DBNAME
    124     set_standard_args
    125124
    126125    # specify choice of remote host:(need to choose based on chips)
     
    143142    exec mkdir -p $outroot
    144143
    145     $run = camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA $ARGS
     144    $run = camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA
    146145    if ("$WORKDIR" != "NULL")
    147146      $run = $run --workdir $WORKDIR
    148147    end
     148    add_standard_args run
    149149
    150150    # save the pageName for future reference below
  • trunk/ippTasks/chip.pro

    r12371 r12697  
    124124    book getword chipPendingImfile $pageName uri -var URI
    125125    book getword chipPendingImfile $pageName dbname -var DBNAME
    126     set_standard_args
    127126
    128127    # specify choice of remote host
     
    146145    exec mkdir -p $outroot
    147146
    148     $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA $ARGS
     147    $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA
    149148    if ("$WORKDIR" != "NULL")
    150149      $run = $run --workdir $WORKDIR
    151150    end
     151    add_standard_args run
    152152
    153153    # save the pageName for future reference below
  • trunk/ippTasks/detrend.norm.pro

    r12371 r12697  
    155155    book getword detPendingNormStatImfile $pageName workdir   -var WORKDIR
    156156    book getword detPendingNormStatImfile $pageName dbname    -var DBNAME
    157     set_standard_args
    158157
    159158    # specify choice of remote host:
     
    175174    exec mkdir -p $outroot
    176175
    177     $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS
     176    $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE
    178177    if ("$WORKDIR" != "NULL")
    179178      $run = $run --workdir $WORKDIR
    180179    end
     180    add_standard_args run
    181181
    182182    # save the pageName for future reference below
     
    277277    book getword detPendingNormImfile $pageName workdir   -var WORKDIR
    278278    book getword detPendingNormImfile $pageName dbname    -var DBNAME
    279     set_standard_args
    280279
    281280    # specify choice of remote host:
     
    298297    exec mkdir -p $outroot
    299298
    300     $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 $ARGS
     299    $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
    301300    if ("$WORKDIR" != "NULL")
    302301      $run = $run --workdir $WORKDIR
    303302    end
     303    add_standard_args run
    304304   
    305305    # save the pageName for future reference below
     
    397397    book getword detPendingNormExp $pageName workdir   -var WORKDIR
    398398    book getword detPendingNormExp $pageName dbname    -var DBNAME
    399     set_standard_args
    400399
    401400    # specify choice of remote host:
     
    418417    exec mkdir -p $outroot
    419418
    420     $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE  $ARGS
     419    $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE
    421420    if ("$WORKDIR" != "NULL")
    422421      $run = $run --workdir $WORKDIR
    423422    end
     423    add_standard_args run
    424424
    425425    # save the pageName for future reference below
  • trunk/ippTasks/detrend.process.pro

    r12670 r12697  
    144144    book getword detPendingProcessedImfile $pageName workdir  -var WORKDIR
    145145    book getword detPendingProcessedImfile $pageName dbname   -var DBNAME
    146     set_standard_args
    147146
    148147    # specify choice of remote host:
     
    165164    exec mkdir -p $outroot
    166165
    167     $run = detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS
     166    $run = detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA
    168167    if ("$WORKDIR" != "NULL")
    169168      $run = $run --workdir $WORKDIR
    170169    end
     170    add_standard_args run
    171171
    172172    # save the pageName for future reference below
     
    266266    book getword detPendingProcessedExp $pageName workdir   -var WORKDIR
    267267    book getword detPendingProcessedExp $pageName dbname    -var DBNAME
    268     set_standard_args
    269268
    270269    # specify choice of remote host:
     
    287286    exec mkdir -p $outroot
    288287
    289     $run = detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS
     288    $run = detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA
    290289    if ("$WORKDIR" != "NULL")
    291290      $run = $run --workdir $WORKDIR
    292291    end
     292    add_standard_args run
    293293
    294294    # save the pageName for future reference below
  • trunk/ippTasks/detrend.reject.pro

    r12371 r12697  
    124124    book getword detRejectExp $pageName workdir   -var WORKDIR
    125125    book getword detRejectExp $pageName dbname    -var DBNAME
    126     set_standard_args
    127126
    128127    # specify choice of remote host:
     
    144143    exec mkdir -p $outroot
    145144
    146     $run = detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA $ARGS
     145    $run = detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA
    147146    if ("$WORKDIR" != "NULL")
    148147      $run = $run --workdir $WORKDIR
    149148    end
     149    add_standard_args run
    150150
    151151    # save the pageName for future reference below
  • trunk/ippTasks/detrend.resid.pro

    r12371 r12697  
    144144    book getword detPendingResidImfile $pageName workdir   -var WORKDIR
    145145    book getword detPendingResidImfile $pageName dbname    -var DBNAME
    146     set_standard_args
    147146
    148147    # specify choice of remote host:
     
    165164    exec mkdir -p $outroot
    166165
    167     $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 $ARGS
     166    $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
    168167    if ("$WORKDIR" != "NULL")
    169168      $run = $run --workdir $WORKDIR
    170169    end
     170    add_standard_args run
    171171
    172172    # save the pageName for future reference below
     
    267267    book getword detPendingResidExp $pageName workdir   -var WORKDIR
    268268    book getword detPendingResidExp $pageName dbname    -var DBNAME
    269     set_standard_args
    270269
    271270    # specify choice of remote host:
     
    288287    exec mkdir -p $outroot
    289288
    290     $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS
     289    $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA
    291290    if ("$WORKDIR" != "NULL")
    292291      $run = $run --workdir $WORKDIR
    293292    end
     293    add_standard_args run
    294294
    295295    # save the pageName for future reference below
  • trunk/ippTasks/detrend.stack.pro

    r12371 r12697  
    125125    book getword detPendingStackedImfile $pageName workdir   -var WORKDIR
    126126    book getword detPendingStackedImfile $pageName dbname    -var DBNAME
    127     set_standard_args
    128127
    129128    # specify choice of remote host:
     
    148147    options $pageName
    149148
    150     $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS
     149    $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA
    151150    if ("$WORKDIR" != "NULL")
    152151      $run = $run --workdir $WORKDIR
    153152    end
     153    add_standard_args run
    154154
    155155    # create the command line
  • trunk/ippTasks/diff.pro

    r12371 r12697  
    130130    book getword diffSkyfile $pageName workdir -var WORKDIR
    131131    book getword diffSkyfile $pageName dbname -var DBNAME
    132     set_standard_args
    133132
    134133    # specify choice of remote host
     
    152151    exec mkdir -p $outroot
    153152
    154     $run = diff_skycell.pl --diff_id $DIFF_ID $ARGS
     153    $run = diff_skycell.pl --diff_id $DIFF_ID
    155154    if ("$WORKDIR" != "NULL")
    156155      $run = $run --workdir $WORKDIR
    157156    end
     157    add_standard_args run
    158158
    159159    # save the pageName for future reference below
  • trunk/ippTasks/pantasks.pro

    r12241 r12697  
    155155end
    156156
    157 macro set_standard_args
    158   # XXX be careful: $ARGS cannot be resolved as ""
    159   # XXX currently, sprintf is the only good way of creating
    160   # an empty variable
    161   if ($?WORKDIR == 0)
    162     echo error in pantasks: WORKDIR not set
     157macro add_standard_args
     158  if ($0 != 2)
     159    echo "Must pass in the command of interest, and this function will supplement"
    163160    stop
    164161  end
    165   if ($?DBNAME == 0)
    166     echo error in pantasks: DBNAME not set
    167     stop
    168   end
    169   if ("$DBNAME" != "DEFAULT")
    170     $ARGS = --workdir $WORKDIR --dbname $DBNAME
    171   else
    172     $ARGS = --workdir $WORKDIR
     162
     163  local command
     164  $command = $$1
     165
     166  if ($?DBNAME && "$DBNAME" != "DEFAULT")
     167    $command = $command --dbname $DBNAME
    173168  end
    174169  if ($?NOOP != 0)
    175     $ARGS = $ARGS --no-op
    176   end
    177 end
     170    $command = $command --no-op
     171  end
     172  $$1 = $command
     173end
     174
    178175
    179176macro process_exit
  • trunk/ippTasks/register.pro

    r12361 r12697  
    142142    book getword regPendingImfile $pageName workdir -var WORKDIR
    143143    book getword regPendingImfile $pageName dbname -var DBNAME
    144     set_standard_args
    145144
    146145    # specify choice of remote host
     
    162161    options $pageName
    163162
     163    $run = register_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
     164    add_standard_args run
     165
    164166    # create the command line
    165167    if ($VERBOSE > 1)
    166       echo command register_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI $ARGS
    167     end
    168     command register_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI $ARGS
     168      echo command $run
     169    end
     170    command $run
    169171  end
    170172
     
    247249    book getword regPendingExp $pageName workdir -var WORKDIR
    248250    book getword regPendingExp $pageName dbname -var DBNAME
    249     set_standard_args
    250251
    251252    # specify choice of remote host:(need to choose based on chips)
     
    267268    options $pageName
    268269
     270    $run = register_exp.pl --exp_tag $EXP_TAG
     271    add_standard_args run
     272
    269273    # create the command line
    270274    if ($VERBOSE > 1)
    271       echo command register_exp.pl --exp_tag $EXP_TAG $ARGS
    272     end
    273     command register_exp.pl --exp_tag $EXP_TAG $ARGS
     275      echo command $run
     276    end
     277    command $run
    274278  end
    275279
  • trunk/ippTasks/stack.pro

    r12371 r12697  
    130130    book getword stackSumSkyfile $pageName workdir -var WORKDIR
    131131    book getword stackSumSkyfile $pageName dbname -var DBNAME
    132     set_standard_args
    133132
    134133    # specify choice of remote host
     
    152151    exec mkdir -p $outroot
    153152
    154     $run = stack_skycell.pl --stack_id $STACK_ID $ARGS
     153    $run = stack_skycell.pl --stack_id $STACK_ID
    155154    if ("$WORKDIR" != "NULL")
    156155      $run = $run --workdir $WORKDIR
    157156    end
     157    add_standard_args run
    158158
    159159    # save the pageName for future reference below
  • trunk/ippTasks/warp.pro

    r12371 r12697  
    147147    book getword warpInputExp $pageName workdir -var WORKDIR
    148148    book getword warpInputExp $pageName dbname -var DBNAME
    149     set_standard_args
    150149
    151150    # specify choice of remote host
     
    169168    exec mkdir -p $outroot
    170169
    171     $run = warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA $ARGS
     170    $run = warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA
    172171    if ("$WORKDIR" != "NULL")
    173172      $run = $run --workdir $WORKDIR
    174173    end
     174    add_standard_args run
    175175
    176176    # save the pageName for future reference below
     
    270270    book getword warpPendingSkyCell $pageName workdir -var WORKDIR
    271271    book getword warpPendingSkyCell $pageName dbname -var DBNAME
    272     set_standard_args
    273272
    274273    # specify choice of remote host
     
    292291    exec mkdir -p $outroot
    293292
    294     $run = warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA $ARGS
     293    $run = warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA
    295294    if ("$WORKDIR" != "NULL")
    296295      $run = $run --workdir $WORKDIR
    297296    end
     297    add_standard_args run
    298298
    299299    # save the pageName for future reference below
Note: See TracChangeset for help on using the changeset viewer.