Changeset 8691 for trunk/ippTasks/detrend.assess.pro
- Timestamp:
- Aug 29, 2006, 2:28:33 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.assess.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.assess.pro
r8193 r8691 1 1 2 ## this file contains the tasks for running the detrend normalizationstage2 ## this file contains the tasks for running the detrend processing stage 3 3 4 ## these tasks use the queue DetrendRunToAssess 4 # dettool -toresidexp -simple 5 # 1 0 bias 850131b T 6 # DET_ID ITER TYPE EXP_KEY INCLUDE 7 8 # detrend_reject_imfile.pl 1 0 850131b bias 9 # detrend_reject_imfile.pl DET_ID ITER EXP_KEY TYPE 10 11 ## these tasks use the queue DetrendResidExp 12 ## the DetrendResidExp queue contains: 13 ## STATE DET_ID ITER TYPE EXP_KEY INCLUDE 5 14 6 15 # select images ready for copy 7 # new entries are added to queue DetrendR unToAssess16 # new entries are added to queue DetrendResidExp 8 17 # compare the new list with the ones already selected 9 18 task dettool.assess.load 10 command dettool - stacked -runs19 command dettool -toresidexp -simple 11 20 host local 12 21 … … 17 26 # success 18 27 task.exit 0 19 # XXX is it necessary for these to be local?20 # drop after this task macro is done?21 28 local i Nqueue 22 29 … … 26 33 for i 0 $Nqueue 27 34 queuepop stdout -var line 28 queuepush DetrendRunToAssess -uniq -key 1:2:4 "NEW $line" 35 list word -split $line 36 $DET_ID = $word:0 37 $ITER = $word:1 38 $TYPE = $word:2 39 $EXP_KEY = $word:3 40 $INCLUDE = $word:4 41 queuepush DetrendResidExp -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $EXP_KEY $INCLUDE" 29 42 end 30 43 31 44 # delete existing entries which are DONE 32 queuedrop DetrendR unToAssess-key 0 DONE45 queuedrop DetrendResidExp -key 0 DONE 33 46 end 34 47 … … 50 63 51 64 # copy new images, sending job to desired host 52 task dettool. assess.process65 task dettool.resid.process 53 66 periods -poll 0.5 54 67 periods -exec 1.0 … … 56 69 57 70 task.exec 58 queuesize DetrendRunToAssess -var N 59 71 queuesize DetrendResidExp -var N 60 72 if ($N == 0) break 61 73 if ($network == 0) break 62 74 63 # look for new images on the internal DetrendR unToAssessqueue75 # look for new images on the internal DetrendResidExp queue 64 76 # caution with these 'if' statements: syntax errors 65 77 # will make the task fail without given a good status 66 queuepop DetrendR unToAssess-var line -key 0 NEW78 queuepop DetrendResidExp -var line -key 0 NEW 67 79 if ("$line" == "NULL") break 68 80 69 81 strpop line state 70 queuepush DetrendRunToAssess -replace -key 0 "RUN $line" 82 queuepush DetrendResidExp -replace -key 1:2:4 "RUN $line" 83 84 ## the DetrendResidExp queue contains: 85 ## STATE DET_ID ITER TYPE EXP_KEY INCLUDE 86 ## NOTE: the queue has the STATE prepended 87 list word -split $line 88 $DET_ID = $word:1 89 $ITER = $word:2 90 $TYPE = $word:3 91 $EXP_KEY = $word:4 92 $INCLUDE = $word:5 71 93 72 94 # specify choice of remote host: 73 # 'anyhost' specified random remote host74 # if we needed to specify a host explicitly, use a command like75 # one of the following. the -required forces execution on the76 # named host, and blocks the task until the host is available77 # host kiawe78 # host alala -required79 95 host anyhost 80 81 # choose the default recipe appropriate to this type of file82 $recipe = `get.recipe $type`83 96 84 97 # create example job options as a demonstration 85 98 options "$line" 86 87 # we can put the dettool and ppMerge commands here, or wrap them in a single script 88 # $urilist = `dettool -stacked -det_id $det_id -iteration $iteration -chip" 89 # $uri_out = ??? 90 # command ppNorm $uri_out $uri $uri ... -recipe PPMERGE $recipe ??? 91 command ASSESS?? $uri_out -det_id $det_id -iteration $iteration -recipe PPMERGE $recipe 99 # detrend_reject_imfile.pl 1 0 850131b bias 100 # detrend_reject_imfile.pl DET_ID ITER EXP_KEY TYPE 101 command detrend_reject_imfile.pl $DET_ID $ITER $EXP_KEY $TYPE 92 102 end 93 103 94 104 # success 95 105 task.exit 0 96 # XXX need to parse the options to identify the values below (if not part of cmdline?) 97 exec dettool -addstacked -det_id $det_id -iteration $iteration -class_id $class_id -procrecipe $recipe 98 queuepush DetrendRunToAssess -replace -key 1:2:4 "DONE $options:0" 106 queuepush DetrendResidExp -replace -key 1:2:4 "DONE $options:0" 99 107 end 100 108 101 109 # default exit status 102 110 task.exit default 103 queuepush DetrendR unToAssess -replace -key 0"FAIL $options:0"111 queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0" 104 112 end 105 113 106 114 # operation times out? 107 115 task.exit timeout 108 queuepush DetrendR unToAssess -replace -key 0"FAIL $options:0"116 queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0" 109 117 end 110 118 end
Note:
See TracChangeset
for help on using the changeset viewer.
