Changeset 10692 for trunk/ippTasks/detrend.reject.pro
- Timestamp:
- Dec 12, 2006, 11:58:21 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.reject.pro (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.reject.pro
r10542 r10692 13 13 ## STATE DET_ID ITER TYPE 14 14 15 queueinit DetrendRejectExp osure15 queueinit DetrendRejectExp 16 16 if ($?network == 0) 17 17 $network = 1 … … 21 21 end 22 22 23 $DetrendRejectExpFail = 0 24 25 if ($?VERBOSE == 0) 26 echo "VERBOSE not defined: load pantasks.pro first" 27 break 28 end 29 if ($?LOGDIR == 0) 30 echo "LOGDIR not defined: load pantasks.pro first" 31 break 32 end 33 $LOGSUBDIR = $LOGDIR/detrend 34 exec mkdir -p $LOGSUBDIR 35 36 macro detreject.status 37 queueprint DetrendRejectExp 38 echo "DetrendRejectExpFail: $DetrendRejectExpFail" 39 end 40 23 41 # select images ready for copy 24 # new entries are added to queue DetrendRejectExp osure42 # new entries are added to queue DetrendRejectExp 25 43 # compare the new list with the ones already selected 26 44 task dettool.reject.load 27 command dettool -residdetrun -simple28 45 host local 29 46 … … 32 49 periods -timeout 30 33 50 34 stdout dettool.reject.log 35 stderr dettool.reject.log 51 stdout $LOGSUBDIR/dettool.reject.log 52 stderr $LOGSUBDIR/dettool.reject.log 53 54 task.exec 55 command dettool -residdetrun -simple -limit {$DetrendRejectExpFail + 20} 56 end 36 57 37 58 # success … … 44 65 for i 0 $Nqueue 45 66 queuepop stdout -var line 67 if ($VERBOSE > 2) 68 echo $line 69 end 46 70 list word -split $line 47 71 $DET_ID = $word:0 … … 50 74 $MODE = $word:3 51 75 $CAMERA = $word:4 52 queuepush DetrendRejectExp osure-uniq -key 1:2 "NEW $DET_ID $ITER $DET_TYPE $MODE $CAMERA"76 queuepush DetrendRejectExp -uniq -key 1:2 "NEW $DET_ID $ITER $DET_TYPE $MODE $CAMERA" 53 77 end 54 78 55 79 # delete existing entries which are DONE 56 queuedrop DetrendRejectExp osure-key 0 DONE80 queuedrop DetrendRejectExp -key 0 DONE 57 81 end 58 82 59 83 # locked list 60 84 task.exit default 61 echo "detrend.reject: failure" 85 if ($VERBOSE) 86 echo "detrend.reject: failure" 87 end 62 88 end 63 89 64 90 # operation times out? 65 91 task.exit timeout 66 echo "detrend.reject: timeout" 92 if ($VERBOSE) 93 echo "detrend.reject: timeout" 94 end 67 95 end 68 96 end … … 75 103 76 104 task.exec 77 queuesize DetrendRejectExp osure-var N105 queuesize DetrendRejectExp -var N 78 106 if ($N == 0) break 79 107 if ($network == 0) break 80 108 81 # look for new images on the internal DetrendRejectExp osurequeue109 # look for new images on the internal DetrendRejectExp queue 82 110 # caution with these 'if' statements: syntax errors 83 111 # will make the task fail without given a good status 84 queuepop DetrendRejectExp osure-var line -key 0 NEW112 queuepop DetrendRejectExp -var line -key 0 NEW 85 113 if ("$line" == "NULL") break 86 114 87 115 strpop line state 88 queuepush DetrendRejectExp osure-replace -key 1:2 "RUN $line"116 queuepush DetrendRejectExp -replace -key 1:2 "RUN $line" 89 117 90 ## the DetrendRejectExp osurequeue contains:118 ## the DetrendRejectExp queue contains: 91 119 ## STATE DET_ID ITER TYPE 92 120 ## NOTE: the queue has the STATE prepended … … 98 126 99 127 # I'd like to add CAMERA to the log file... 100 stdout $ CAMERA.$DET_TYPE.$DET_ID.$ITER.log101 stderr $ CAMERA.$DET_TYPE.$DET_ID.$ITER.log128 stdout $LOGSUBDIR/$CAMERA.$DET_TYPE.$DET_ID.$ITER.log 129 stderr $LOGSUBDIR/$CAMERA.$DET_TYPE.$DET_ID.$ITER.log 102 130 103 131 # specify choice of remote host: … … 110 138 # create example job options as a demonstration 111 139 options "$line" 112 echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITER --det_type $DET_TYPE --camera $CAMERA 140 if ($VERBOSE > 1) 141 echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITER --det_type $DET_TYPE --camera $CAMERA 142 end 113 143 command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITER --det_type $DET_TYPE --camera $CAMERA 114 144 end … … 116 146 # success 117 147 task.exit 0 118 queuepush DetrendRejectExp osure-replace -key 1:2 "DONE $options:0"148 queuepush DetrendRejectExp -replace -key 1:2 "DONE $options:0" 119 149 end 120 150 121 151 # default exit status 122 152 task.exit default 123 queuepush DetrendRejectExposure -replace -key 1:2 "FAIL $options:0" 153 if ($VERBOSE) 154 echo "failure detrend_reject_exp.pl $options:0" 155 end 156 queuepush DetrendRejectExp -replace -key 1:2 "FAIL $options:0" 157 $DetrendRejectExpFail ++ 124 158 end 125 159 126 160 # operation times out? 127 161 task.exit timeout 128 queuepush DetrendRejectExposure -replace -key 1:2 "TIMEOUT $options:0" 162 if ($VERBOSE) 163 echo "failure detrend_reject_exp.pl $options:0" 164 end 165 queuepush DetrendRejectExp -replace -key 1:2 "TIMEOUT $options:0" 166 $DetrendRejectExpFail ++ 129 167 end 130 168 end
Note:
See TracChangeset
for help on using the changeset viewer.
