IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2008, 3:05:17 PM (18 years ago)
Author:
eugene
Message:

adding det_type, generate sensible workdir, better polling periods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/flatcorr.pro

    r20229 r20382  
    6666
    6767  # check the list of pending flatcorr runs
    68   periods      -poll 10
    69   periods      -exec 120
     68  periods      -poll $LOADPOLL
     69  periods      -exec $LOADEXEC
    7070  periods      -timeout 60
    7171  npending 1
    7272
    73   # define the command (does not depend on previous queries)
    74   if ($DB:n == 0)
    75     command flatcorr -addcamera
    76   else
    77     # save the DB name for the exit tasks
    78     # note that this DB name refers to the ippdb, not the dvodb
    79     option $DB:$flatcorr_addcamera_DB
    80     command flatcorr -addcamera -dbname $DB:$flatcorr_addcamera_DB
    81     $flatcorr_addcamera_DB ++
    82     if ($flatcorr_addcamera_DB >= $DB:n) set flatcorr_addcamera_DB = 0
     73  task.exec
     74    # define the command (does not depend on previous queries)
     75    if ($DB:n == 0)
     76      command flatcorr -addcamera
     77    else
     78      # save the DB name for the exit tasks
     79      # note that this DB name refers to the ippdb, not the dvodb
     80      option $DB:$flatcorr_addcamera_DB
     81      command flatcorr -addcamera -dbname $DB:$flatcorr_addcamera_DB
     82      $flatcorr_addcamera_DB ++
     83      if ($flatcorr_addcamera_DB >= $DB:n) set flatcorr_addcamera_DB = 0
     84    end
    8385  end
    8486
     
    108110
    109111  # check the list of pending flatcorr runs
    110   periods      -poll 10
    111   periods      -exec 900
     112  periods      -poll $LOADPOLL
     113  periods      -exec $LOADEXEC
    112114  periods      -timeout 60
    113115  npending 1
    114116
    115117  # define the command (does not depend on previous queries)
    116   $run = flatcorr -pendingprocess
    117   if ($DB:n != 0)
    118     # save the DB name for the exit tasks
    119     option $DB:$flatcorr_pendingprocess_DB
    120     $run = $run -dbname $DB:$flatcorr_pendingprocess_DB
    121     $flatcorr_pendingprocess_DB ++
    122     if ($flatcorr_pendingprocess_DB >= $DB:n) set flatcorr_pendingprocess_DB = 0
    123   end
    124   add_poll_args run
    125   command $run
     118  task.exec
     119    if ($DB:n == 0)
     120      $run = flatcorr -pendingprocess
     121    else
     122      $run = flatcorr -pendingprocess
     123      # save the DB name for the exit tasks
     124      option $DB:$flatcorr_pendingprocess_DB
     125      $run = $run -dbname $DB:$flatcorr_pendingprocess_DB
     126      $flatcorr_pendingprocess_DB ++
     127      if ($flatcorr_pendingprocess_DB >= $DB:n) set flatcorr_pendingprocess_DB = 0
     128    end
     129    add_poll_args run
     130    command $run
     131  end
    126132
    127133  # silently drop stdout
     
    175181
    176182    # XXX probably need to set the output / log based on WORKDIR...
    177     book getword flatcorrBook $pageName corr_id     -var ID
     183    book getword flatcorrBook $pageName corr_id     -var CORR_ID
     184    book getword flatcorrBook $pageName det_type    -var DET_TYPE
    178185    book getword flatcorrBook $pageName dvodb       -var DVODB
    179186    book getword flatcorrBook $pageName camera      -var CAMERA
     
    181188    book getword flatcorrBook $pageName filter      -var FILTER
    182189    book getword flatcorrBook $pageName dbname      -var DBNAME
    183     book getword flatcorrBook $pageName workdir     -var WORKDIR
     190    book getword flatcorrBook $pageName workdir     -var WORKDIR_TEMPLATE
    184191
    185192    # specify choice of remote host
     
    194201    options $pageName
    195202
     203    # see chip.pro for examples
     204    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     205
     206    ## generate outroot specific to this exposure (& chip)
     207    sprintf outroot "%s/%s.flatcorr.%s" $WORKDIR $CAMERA $CORR_ID
     208
    196209    # XXX get these arguments right
    197     $run = flatcorr_proc.pl --corr_id $ID --dvodb $DVODB --camera $CAMERA --region $REGION --filter $FILTER
     210    $run = flatcorr_proc.pl --corr_id $CORR_ID --det_type $DET_TYPE --dvodb $DVODB --camera $CAMERA --region $REGION --filter $FILTER --workdir $outroot
    198211    add_standard_args run
    199212
Note: See TracChangeset for help on using the changeset viewer.