Changeset 9104 for trunk/ippTasks/detrend.resid.pro
- Timestamp:
- Oct 2, 2006, 12:36:59 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.resid.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.resid.pro
r9081 r9104 15 15 16 16 queueinit DetrendResidImfiles 17 queueinit DetrendResidExp 17 queueinit DetrendResidExposures 18 18 if ($?network == 0) 19 19 $network = 1 … … 65 65 66 66 # locked list 67 task.exit 1 68 echo "new.images: exec failure" 69 end 70 71 # default exit status 72 task.exit default 73 echo "new.images: unknown exit status: $EXIT" 74 end 75 76 # operation times out? 77 task.exit timeout 78 echo "new.images: timeout" 67 # default exit status 68 task.exit default 69 echo "detrend.resid: failure" 70 end 71 72 # operation times out? 73 task.exit timeout 74 echo "detrend.resid: timeout" 79 75 end 80 76 end 81 77 82 78 # copy new images, sending job to desired host 83 task dettool.resid. process79 task dettool.resid.run 84 80 periods -poll 0.5 85 81 periods -exec 5.0 … … 110 106 $CLASS_ID = $word:4 111 107 $URI_IN = $word:5 108 $CAMERA = $word:6 112 109 113 110 stdout $EXP_KEY.detresid.$DET_ID.$ITER.$CLASS_ID.log … … 124 121 options "$line" 125 122 # detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_KEY ???) 126 $URL_DET = isp.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits127 #$URL_DET = $CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits123 # $URL_DET = isp.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits 124 $URL_DET = $CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits 128 125 echo command detrend_create_resid.pl --det_id $DET_ID --iteration $ITER --exp_id $EXP_KEY --class_id $CLASS_ID --det_type $DET_TYPE --detrend $URL_DET --input_uri $URI_IN 129 126 command detrend_create_resid.pl --det_id $DET_ID --iteration $ITER --exp_id $EXP_KEY --class_id $CLASS_ID --det_type $DET_TYPE --detrend $URL_DET --input_uri $URI_IN … … 147 144 148 145 # select images ready for copy 149 # new entries are added to queue DetrendResidExp 146 # new entries are added to queue DetrendResidExposures 150 147 # compare the new list with the ones already selected 151 148 task dettool.residexp.load … … 177 174 $EXP_KEY = $word:3 178 175 $INCLUDE = $word:4 179 queuepush DetrendResidExp -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_KEY $INCLUDE"176 queuepush DetrendResidExposures -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_KEY $INCLUDE" 180 177 end 181 178 182 179 # delete existing entries which are DONE 183 queuedrop DetrendResidExp -key 0 DONE180 queuedrop DetrendResidExposures -key 0 DONE 184 181 end 185 182 186 183 # locked list 187 task.exit 1 188 echo "new.images: exec failure" 189 end 190 191 # default exit status 192 task.exit default 193 echo "new.images: unknown exit status: $EXIT" 194 end 195 196 # operation times out? 197 task.exit timeout 198 echo "new.images: timeout" 184 # default exit status 185 task.exit default 186 echo "detrend.residexp: failure" 187 end 188 189 # operation times out? 190 task.exit timeout 191 echo "detrend.residexp: timeout" 199 192 end 200 193 end 201 194 202 195 # copy new images, sending job to desired host 203 task dettool.residexp. process196 task dettool.residexp.run 204 197 periods -poll 0.5 205 198 periods -exec 5.0 … … 207 200 208 201 task.exec 209 queuesize DetrendResidExp -var N202 queuesize DetrendResidExposures -var N 210 203 if ($N == 0) break 211 204 if ($network == 0) break 212 205 213 # look for new images on the internal DetrendResidExp queue206 # look for new images on the internal DetrendResidExposures queue 214 207 # caution with these 'if' statements: syntax errors 215 208 # will make the task fail without given a good status 216 queuepop DetrendResidExp -var line -key 0 NEW209 queuepop DetrendResidExposures -var line -key 0 NEW 217 210 if ("$line" == "NULL") break 218 211 219 212 strpop line state 220 queuepush DetrendResidExp -replace -key 1:2:4 "RUN $line"221 222 ## the DetrendResidExp queue contains:213 queuepush DetrendResidExposures -replace -key 1:2:4 "RUN $line" 214 215 ## the DetrendResidExposures queue contains: 223 216 ## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN 224 217 ## NOTE: the queue has the STATE prepended … … 248 241 # success 249 242 task.exit 0 250 queuepush DetrendResidExp -replace -key 1:2:4 "DONE $options:0"251 end 252 253 # default exit status 254 task.exit default 255 queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0"256 end 257 258 # operation times out? 259 task.exit timeout 260 queuepush DetrendResidExp -replace -key 1:2:4 "TIMEOUT $options:0"261 end 262 end 243 queuepush DetrendResidExposures -replace -key 1:2:4 "DONE $options:0" 244 end 245 246 # default exit status 247 task.exit default 248 queuepush DetrendResidExposures -replace -key 1:2:4 "FAIL $options:0" 249 end 250 251 # operation times out? 252 task.exit timeout 253 queuepush DetrendResidExposures -replace -key 1:2:4 "TIMEOUT $options:0" 254 end 255 end
Note:
See TracChangeset
for help on using the changeset viewer.
