IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 5:20:43 PM (20 years ago)
Author:
eugene
Message:

substantial work to use current db tables

File:
1 edited

Legend:

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

    r9104 r9338  
    1111## these tasks use the queue DetrendProcessImfiles
    1212## the DetrendProcessImfiles queue contains:
    13 ## STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI
     13## STATE DET_ID TYPE EXP_TAG CLASS CLASS_ID URI
    1414
    1515queueinit DetrendProcessImfiles
     
    2626# compare the new list with the ones already selected
    2727task           dettool.process.load
    28   command      dettool -raw -simple
     28  command      dettool -toprocess -simple
    2929  host         local
    3030
     
    4949      list word -split $line
    5050      $DET_ID   = $word:0
    51       $TYPE    = $word:1
    52       $EXP_KEY  = $word:2
     51      $DET_TYPE = $word:1
     52      $EXP_TAG  = $word:2
    5353      $CLASS    = $word:3
    5454      $CLASS_ID = $word:4
    5555      $URI      = $word:5
    56       queuepush DetrendProcessImfiles -uniq -key 1:3:5 "NEW $DET_ID $TYPE $EXP_KEY $CLASS $CLASS_ID $URI"
     56      queuepush DetrendProcessImfiles -uniq -key 1:3:5 "NEW $DET_ID $DET_TYPE $EXP_TAG $CLASS $CLASS_ID $URI"
    5757    end
    5858
     
    9393
    9494    ## the DetrendProcessImfiles queue contains:
    95     # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI
     95    # STATE DET_ID TYPE EXP_TAG CLASS CLASS_ID URI
    9696    ## NOTE: the queue has the STATE prepended
    9797    list word -split $line
    9898    $DET_ID   = $word:0
    99     $TYPE    = $word:1
    100     $EXP_KEY  = $word:2
     99    $DET_TYPE = $word:1
     100    $EXP_TAG  = $word:2
    101101    $CLASS    = $word:3
    102102    $CLASS_ID = $word:4
    103103    $URI      = $word:5
    104104
    105     stdout $EXP_KEY.detproc.$CLASS_ID.log
    106     stderr $EXP_KEY.detproc.$CLASS_ID.log
     105    $LOG_DIR = `dirname $URI`
     106    stdout $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log
     107    stderr $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log
    107108
    108109    # specify choice of remote host:
     
    115116    # create example job options as a demonstration
    116117    options "$line"
    117     echo command detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI
    118     command detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI
     118    echo command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI
     119    command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI
    119120  end
    120121
    121122  # success
    122123  task.exit 0
     124    echo "success detrend_process_imfile.pl $options:0"
    123125    queuepush DetrendProcessImfiles -replace -key 1:3:5 "DONE $options:0"
    124126  end
     
    126128  # default exit status
    127129  task.exit    default
     130    echo "failure detrend_process_imfile.pl $options:0"
    128131    queuepush DetrendProcessImfiles -replace -key 1:3:5 "FAIL $options:0"
    129132  end
     
    131134  # operation times out?
    132135  task.exit    timeout
     136    echo "timeout detrend_process_imfile.pl $options:0"
    133137    queuepush DetrendProcessImfiles -replace -key 1:3:5 "TIMEOUT $options:0"
    134138  end
     
    139143# compare the new list with the ones already selected
    140144task           dettool.processexp.load
    141   command      dettool -toprocessdexp -simple
     145  command      dettool -toprocessedexp -simple
    142146  host         local
    143147
     
    162166      list word -split $line
    163167      $DET_ID   = $word:0
    164       $TYPE     = $word:1
    165       $EXP_KEY  = $word:2
    166       queuepush DetrendProcessExposures -uniq -key 1:3 "NEW $DET_ID $TYPE $EXP_KEY"
     168      $ITER     = $word:1
     169      $DET_TYPE = $word:2
     170      $EXP_TAG  = $word:3
     171      queuepush DetrendProcessExposures -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_TAG"
    167172    end
    168173
     
    200205
    201206    strpop line state
    202     queuepush DetrendProcessExposures -replace -key 1:3:5 "RUN $line"
    203 
    204     ## the DetrendProcessExposures queue contains:
    205     # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI
    206     ## NOTE: the queue has the STATE prepended
     207    queuepush DetrendProcessExposures -replace -key 1:2:4 "RUN $line"
     208
     209
    207210    list word -split $line
    208211    $DET_ID   = $word:0
    209     $TYPE     = $word:1
    210     $EXP_KEY  = $word:2
    211 
    212     stdout $EXP_KEY.detproc.$CLASS_ID.log
    213     stderr $EXP_KEY.detproc.$CLASS_ID.log
     212    $ITER     = $word:1
     213    $DET_TYPE = $word:2
     214    $EXP_TAG  = $word:3
     215
     216    # XXX need the classID in dettool -toprocessedexp -simple output
     217    $CLASS_ID = isp
     218    stdout $EXP_TAG.detproc.$DET_ID.log
     219    stderr $EXP_TAG.detproc.$DET_ID.log
    214220
    215221    # specify choice of remote host:
     
    222228    # create example job options as a demonstration
    223229    options "$line"
    224     echo command detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_KEY --det_type bias
    225     command detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_KEY --det_type bias
     230    echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG
     231    command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG
    226232  end
    227233
    228234  # success
    229235  task.exit 0
    230     queuepush DetrendProcessExposures -replace -key 1:3:5 "DONE $options:0"
     236    queuepush DetrendProcessExposures -replace -key 1:2:4 "DONE $options:0"
    231237  end
    232238
    233239  # default exit status
    234240  task.exit    default
    235     queuepush DetrendProcessExposures -replace -key 1:3:5 "FAIL $options:0"
    236   end
    237 
    238   # operation times out?
    239   task.exit    timeout
    240     queuepush DetrendProcessExposures -replace -key 1:3:5 "TIMEOUT $options:0"
    241   end
    242 end
     241    queuepush DetrendProcessExposures -replace -key 1:2:4 "FAIL $options:0"
     242  end
     243
     244  # operation times out?
     245  task.exit    timeout
     246    queuepush DetrendProcessExposures -replace -key 1:2:4 "TIMEOUT $options:0"
     247  end
     248end
Note: See TracChangeset for help on using the changeset viewer.