Changeset 9104
- Timestamp:
- Oct 2, 2006, 12:36:59 PM (20 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 1 deleted
- 7 edited
-
detrend.assess.pro (deleted)
-
detrend.norm.pro (modified) (3 diffs)
-
detrend.process.pro (modified) (5 diffs)
-
detrend.reject.pro (modified) (5 diffs)
-
detrend.resid.pro (modified) (8 diffs)
-
detrend.stack.pro (modified) (6 diffs)
-
pantasks.pro (modified) (2 diffs)
-
phase0.pro (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.norm.pro
r8193 r9104 2 2 ## this file contains the tasks for running the detrend normalization stage 3 3 4 ## these tasks use the queue DetrendRunToNormalize 4 ## these tasks use the queue DetrendNormalize 5 ## the DetrendNormalize queue contains: 6 ## STATE DET_ID ITER 7 8 queueinit DetrendNormalize 9 queueinit DetrendNormStat 10 queueinit DetrendNormalizeExposures 11 if ($?network == 0) 12 $network = 1 13 end 14 if ($?parallel == 0) 15 $parallel = 0 16 end 5 17 6 18 # select images ready for copy 7 # new entries are added to queue Detrend RunToNormalize19 # new entries are added to queue DetrendNormalize 8 20 # compare the new list with the ones already selected 9 21 task dettool.norm.load 10 command dettool - stacked -runs22 command dettool -tonormalize -simple 11 23 host local 12 24 13 25 periods -poll 1 14 26 periods -exec 5 15 periods -timeout 30 27 periods -timeout 5 28 29 stdout dettool.norm.log 30 stderr dettool.norm.log 16 31 17 32 # success … … 26 41 for i 0 $Nqueue 27 42 queuepop stdout -var line 28 queuepush Detrend RunToNormalize -uniq -key 1:2:4"NEW $line"43 queuepush DetrendNormalize -uniq -key 1:2 "NEW $line" 29 44 end 30 45 31 46 # delete existing entries which are DONE 32 queuedrop Detrend RunToNormalize -key 0 DONE47 queuedrop DetrendNormalize -key 0 DONE 33 48 end 34 49 35 50 # locked list 36 task.exit 1 37 echo "new.images: exec failure" 38 end 39 40 # default exit status 41 task.exit default 42 echo "new.images: unknown exit status: $EXIT" 43 end 44 45 # operation times out? 46 task.exit timeout 47 echo "new.images: timeout" 51 # default exit status 52 task.exit default 53 echo "detrend.norm: failure" 54 end 55 56 # operation times out? 57 task.exit timeout 58 echo "detrend.norm: timeout" 48 59 end 49 60 end … … 52 63 task dettool.norm.process 53 64 periods -poll 0.5 54 periods -exec 1.055 periods -timeout 565 periods -exec 5.0 66 periods -timeout 30 56 67 57 68 task.exec 58 queuesize Detrend RunToNormalize -var N69 queuesize DetrendNormalize -var N 59 70 60 71 if ($N == 0) break 61 72 if ($network == 0) break 62 73 63 # look for new images on the internal Detrend RunToNormalize queue74 # look for new images on the internal DetrendNormalize queue 64 75 # caution with these 'if' statements: syntax errors 65 76 # will make the task fail without given a good status 66 queuepop Detrend RunToNormalize -var line -key 0 NEW77 queuepop DetrendNormalize -var line -key 0 NEW 67 78 if ("$line" == "NULL") break 68 79 69 80 strpop line state 70 queuepush DetrendRunToNormalize -replace -key 0 "RUN $line" 81 queuepush DetrendNormalize -replace -key 1:2 "RUN $line" 82 83 # the DetrendNormalize queue contains: 84 # STATE DET_ID ITER 85 list word -split $line 86 $DET_ID = $word:0 87 $ITER = $word:1 88 89 # XXX we need to get CAMERA and TYPE from this query 90 # stdout $CAMERA.$TYPE.$DET_ID.$ITER.log 91 # stderr $CAMERA.$TYPE.$DET_ID.$ITER.log 92 stdout isp.flat.$DET_ID.$ITER.log 93 stderr isp.flat.$DET_ID.$ITER.log 71 94 72 95 # specify choice of remote host: 73 # 'anyhost' specified random remote host 74 # if we needed to specify a host explicitly, use a command like 75 # one of the following. the -required forces execution on the 76 # named host, and blocks the task until the host is available 77 # host kiawe 78 # host alala -required 79 host anyhost 80 81 # choose the default recipe appropriate to this type of file 82 $recipe = `get.recipe $type` 96 if ($parallel) 97 host anyhost 98 else 99 host local 100 end 83 101 84 102 # create example job options as a demonstration 85 103 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 ppNorm $uri_out -det_id $det_id -iteration $iteration -recipe PPMERGE $recipe 104 echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITER 105 command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITER 92 106 end 93 107 94 108 # success 95 109 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 DetrendRunToNormalize -replace -key 1:2:4 "DONE $options:0" 99 end 100 101 # default exit status 102 task.exit default 103 queuepush DetrendRunToNormalize -replace -key 0 "FAIL $options:0" 104 end 105 106 # operation times out? 107 task.exit timeout 108 queuepush DetrendRunToNormalize -replace -key 0 "FAIL $options:0" 109 end 110 end 110 queuepush DetrendNormalize -replace -key 1:2 "DONE $options:0" 111 end 112 113 # default exit status 114 task.exit default 115 queuepush DetrendNormalize -replace -key 1:2 "FAIL $options:0" 116 end 117 118 # operation times out? 119 task.exit timeout 120 queuepush DetrendNormalize -replace -key 1:2 "TIMEOUT $options:0" 121 end 122 end 123 124 # select images ready for copy 125 # new entries are added to queue DetrendNormStat 126 # compare the new list with the ones already selected 127 task dettool.normstat.load 128 command dettool -normstat -simple 129 host local 130 131 periods -poll 1 132 periods -exec 5 133 periods -timeout 5 134 135 stdout dettool.normstat.log 136 stderr dettool.normstat.log 137 138 # success 139 task.exit 0 140 # XXX is it necessary for these to be local? 141 # drop after this task macro is done? 142 local i Nqueue 143 144 # compare output with newImage queue 145 # only add entries which don't exist in queue 146 queuesize stdout -var Nqueue 147 for i 0 $Nqueue 148 queuepop stdout -var line 149 queuepush DetrendNormStat -uniq -key 1:2 "NEW $line" 150 end 151 152 # delete existing entries which are DONE 153 queuedrop DetrendNormStat -key 0 DONE 154 end 155 156 # locked list 157 # default exit status 158 task.exit default 159 echo "detrend.norm: failure" 160 end 161 162 # operation times out? 163 task.exit timeout 164 echo "detrend.norm: timeout" 165 end 166 end 167 168 # copy new images, sending job to desired host 169 task dettool.normstat.process 170 periods -poll 0.5 171 periods -exec 5.0 172 periods -timeout 30 173 174 task.exec 175 queuesize DetrendNormStat -var N 176 177 if ($N == 0) break 178 if ($network == 0) break 179 180 # look for new images on the internal DetrendNormStat queue 181 # caution with these 'if' statements: syntax errors 182 # will make the task fail without given a good status 183 queuepop DetrendNormStat -var line -key 0 NEW 184 if ("$line" == "NULL") break 185 186 strpop line state 187 queuepush DetrendNormStat -replace -key 1:2 "RUN $line" 188 189 # the DetrendNormStat queue contains: 190 # STATE DET_ID ITER 191 list word -split $line 192 $DET_ID = $word:0 193 $ITER = $word:1 194 195 # XXX we need to get CAMERA and TYPE from this query 196 # stdout $CAMERA.$TYPE.$DET_ID.$ITER.log 197 # stderr $CAMERA.$TYPE.$DET_ID.$ITER.log 198 stdout isp.flat.$DET_ID.$ITER.log 199 stderr isp.flat.$DET_ID.$ITER.log 200 201 # specify choice of remote host: 202 if ($parallel) 203 host anyhost 204 else 205 host local 206 end 207 208 # create example job options as a demonstration 209 options "$line" 210 echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITER 211 command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITER 212 end 213 214 # success 215 task.exit 0 216 queuepush DetrendNormStat -replace -key 1:2 "DONE $options:0" 217 end 218 219 # default exit status 220 task.exit default 221 queuepush DetrendNormStat -replace -key 1:2 "FAIL $options:0" 222 end 223 224 # operation times out? 225 task.exit timeout 226 queuepush DetrendNormStat -replace -key 1:2 "TIMEOUT $options:0" 227 end 228 end 229 230 # select images ready for copy 231 # new entries are added to queue DetrendNormalizeExposures 232 # compare the new list with the ones already selected 233 task dettool.normexp.load 234 command dettool -tonormalizedexp -simple 235 host local 236 237 periods -poll 1 238 periods -exec 5 239 periods -timeout 5 240 241 stdout dettool.normexp.log 242 stderr dettool.normexp.log 243 244 # success 245 task.exit 0 246 # XXX is it necessary for these to be local? 247 # drop after this task macro is done? 248 local i Nqueue 249 250 # compare output with newImage queue 251 # only add entries which don't exist in queue 252 queuesize stdout -var Nqueue 253 for i 0 $Nqueue 254 queuepop stdout -var line 255 queuepush DetrendNormalizeExposures -uniq -key 1:2 "NEW $line" 256 end 257 258 # delete existing entries which are DONE 259 queuedrop DetrendNormalizeExposures -key 0 DONE 260 end 261 262 # locked list 263 # default exit status 264 task.exit default 265 echo "detrend.norm: failure" 266 end 267 268 # operation times out? 269 task.exit timeout 270 echo "detrend.norm: timeout" 271 end 272 end 273 274 # copy new images, sending job to desired host 275 task dettool.normexp.process 276 periods -poll 0.5 277 periods -exec 5.0 278 periods -timeout 30 279 280 task.exec 281 queuesize DetrendNormalizeExposures -var N 282 283 if ($N == 0) break 284 if ($network == 0) break 285 286 # look for new images on the internal DetrendNormalizeExposures queue 287 # caution with these 'if' statements: syntax errors 288 # will make the task fail without given a good status 289 queuepop DetrendNormalizeExposures -var line -key 0 NEW 290 if ("$line" == "NULL") break 291 292 strpop line state 293 queuepush DetrendNormalizeExposures -replace -key 1:2 "RUN $line" 294 295 # the DetrendNormalizeExposures queue contains: 296 # STATE DET_ID ITER 297 list word -split $line 298 $DET_ID = $word:0 299 $ITER = $word:1 300 301 # XXX we need to get CAMERA and TYPE from this query 302 # stdout $CAMERA.$TYPE.$DET_ID.$ITER.log 303 # stderr $CAMERA.$TYPE.$DET_ID.$ITER.log 304 stdout isp.flat.$DET_ID.$ITER.log 305 stderr isp.flat.$DET_ID.$ITER.log 306 307 # specify choice of remote host: 308 if ($parallel) 309 host anyhost 310 else 311 host local 312 end 313 314 # create example job options as a demonstration 315 options "$line" 316 echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITER 317 command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITER 318 end 319 320 # success 321 task.exit 0 322 queuepush DetrendNormalizeExposures -replace -key 1:2 "DONE $options:0" 323 end 324 325 # default exit status 326 task.exit default 327 queuepush DetrendNormalizeExposures -replace -key 1:2 "FAIL $options:0" 328 end 329 330 # operation times out? 331 task.exit timeout 332 queuepush DetrendNormalizeExposures -replace -key 1:2 "TIMEOUT $options:0" 333 end 334 end -
trunk/ippTasks/detrend.process.pro
r9081 r9104 9 9 # detrend_process.pl 1 850131b mc bias 850131b.fits 850131b 10 10 11 ## these tasks use the queue Detrend ImfilesToProcess12 ## the Detrend ImfilesToProcess queue contains:11 ## these tasks use the queue DetrendProcessImfiles 12 ## the DetrendProcessImfiles queue contains: 13 13 ## STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 14 14 15 queueinit DetrendImfilesToProcess 15 queueinit DetrendProcessImfiles 16 queueinit DetrendProcessExposures 16 17 if ($?network == 0) 17 18 $network = 1 … … 22 23 23 24 # select images ready for copy 24 # new entries are added to queue Detrend ImfilesToProcess25 # new entries are added to queue DetrendProcessImfiles 25 26 # compare the new list with the ones already selected 26 task dettool. raw.load27 task dettool.process.load 27 28 command dettool -raw -simple 28 29 host local … … 53 54 $CLASS_ID = $word:4 54 55 $URI = $word:5 55 queuepush Detrend ImfilesToProcess -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 $TYPE $EXP_KEY $CLASS $CLASS_ID $URI" 56 57 end 57 58 58 59 # delete existing entries which are DONE 59 queuedrop DetrendImfilesToProcess -key 0 DONE 60 end 61 62 # locked list 63 task.exit 1 64 echo "new.images: exec failure" 65 end 66 67 # default exit status 68 task.exit default 69 echo "new.images: unknown exit status: $EXIT" 70 end 71 72 # operation times out? 73 task.exit timeout 74 echo "new.images: timeout" 60 queuedrop DetrendProcessImfiles -key 0 DONE 61 end 62 63 # error 64 task.exit default 65 echo "detrend.process: failure" 66 end 67 68 # operation times out? 69 task.exit timeout 70 echo "detrend.process: timeout" 75 71 end 76 72 end 77 73 78 74 # copy new images, sending job to desired host 79 task dettool. raw.process75 task dettool.process.run 80 76 periods -poll 0.5 81 77 periods -exec 2.0 … … 83 79 84 80 task.exec 85 queuesize Detrend ImfilesToProcess -var N81 queuesize DetrendProcessImfiles -var N 86 82 if ($N == 0) break 87 83 if ($network == 0) break 88 84 89 # look for new images on the internal Detrend ImfilesToProcess queue85 # look for new images on the internal DetrendProcessImfiles queue 90 86 # caution with these 'if' statements: syntax errors 91 87 # will make the task fail without given a good status 92 queuepop Detrend ImfilesToProcess -var line -key 0 NEW88 queuepop DetrendProcessImfiles -var line -key 0 NEW 93 89 if ("$line" == "NULL") break 94 90 95 91 strpop line state 96 queuepush Detrend ImfilesToProcess -replace -key 1:3:5 "RUN $line"97 98 ## the Detrend ImfilesToProcess queue contains:92 queuepush DetrendProcessImfiles -replace -key 1:3:5 "RUN $line" 93 94 ## the DetrendProcessImfiles queue contains: 99 95 # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 100 96 ## NOTE: the queue has the STATE prepended … … 119 115 # create example job options as a demonstration 120 116 options "$line" 121 echo command detrend_process .pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI122 command detrend_process .pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI117 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 123 119 end 124 120 125 121 # success 126 122 task.exit 0 127 queuepush Detrend ImfilesToProcess -replace -key 1:3:5 "DONE $options:0"123 queuepush DetrendProcessImfiles -replace -key 1:3:5 "DONE $options:0" 128 124 end 129 125 130 126 # default exit status 131 127 task.exit default 132 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "FAIL $options:0" 133 end 134 135 # operation times out? 136 task.exit timeout 137 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "TIMEOUT $options:0" 138 end 139 end 128 queuepush DetrendProcessImfiles -replace -key 1:3:5 "FAIL $options:0" 129 end 130 131 # operation times out? 132 task.exit timeout 133 queuepush DetrendProcessImfiles -replace -key 1:3:5 "TIMEOUT $options:0" 134 end 135 end 136 137 # select images ready for copy 138 # new entries are added to queue DetrendProcessExposures 139 # compare the new list with the ones already selected 140 task dettool.processexp.load 141 command dettool -toprocessdexp -simple 142 host local 143 144 periods -poll 1 145 periods -exec 5 146 periods -timeout 30 147 148 stdout dettool.processexp.log 149 stderr dettool.processexp.log 150 151 # success 152 task.exit 0 153 # XXX is it necessary for these to be local? 154 # drop after this task macro is done? 155 local i Nqueue 156 157 # compare output with newImage queue 158 # only add entries which don't exist in queue 159 queuesize stdout -var Nqueue 160 for i 0 $Nqueue 161 queuepop stdout -var line 162 list word -split $line 163 $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" 167 end 168 169 # delete existing entries which are DONE 170 queuedrop DetrendProcessExposures -key 0 DONE 171 end 172 173 # error 174 task.exit default 175 echo "detrend.process: failure" 176 end 177 178 # operation times out? 179 task.exit timeout 180 echo "detrend.process: timeout" 181 end 182 end 183 184 # copy new images, sending job to desired host 185 task dettool.processexp.run 186 periods -poll 0.5 187 periods -exec 2.0 188 periods -timeout 60 189 190 task.exec 191 queuesize DetrendProcessExposures -var N 192 if ($N == 0) break 193 if ($network == 0) break 194 195 # look for new images on the internal DetrendProcessExposures queue 196 # caution with these 'if' statements: syntax errors 197 # will make the task fail without given a good status 198 queuepop DetrendProcessExposures -var line -key 0 NEW 199 if ("$line" == "NULL") break 200 201 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 list word -split $line 208 $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 214 215 # specify choice of remote host: 216 if ($parallel) 217 host anyhost 218 else 219 host local 220 end 221 222 # create example job options as a demonstration 223 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 226 end 227 228 # success 229 task.exit 0 230 queuepush DetrendProcessExposures -replace -key 1:3:5 "DONE $options:0" 231 end 232 233 # default exit status 234 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 -
trunk/ippTasks/detrend.reject.pro
r9081 r9104 13 13 ## STATE DET_ID ITER TYPE 14 14 15 queueinit DetrendRejectExp 15 queueinit DetrendRejectExposure 16 16 if ($?network == 0) 17 17 $network = 1 … … 22 22 23 23 # select images ready for copy 24 # new entries are added to queue DetrendRejectExp 24 # new entries are added to queue DetrendRejectExposure 25 25 # compare the new list with the ones already selected 26 26 task dettool.reject.load … … 48 48 $ITER = $word:1 49 49 $DET_TYPE = $word:2 50 queuepush DetrendRejectExp -uniq -key 1:2 "NEW $DET_ID $ITER $DET_TYPE"50 queuepush DetrendRejectExposure -uniq -key 1:2 "NEW $DET_ID $ITER $DET_TYPE" 51 51 end 52 52 53 53 # delete existing entries which are DONE 54 queuedrop DetrendRejectExp -key 0 DONE54 queuedrop DetrendRejectExposure -key 0 DONE 55 55 end 56 56 57 57 # locked list 58 task.exit 159 echo "new.images: exec failure"60 end61 62 # default exit status63 58 task.exit default 64 echo " new.images: unknown exit status: $EXIT"59 echo "detrend.reject: failure" 65 60 end 66 61 67 62 # operation times out? 68 63 task.exit timeout 69 echo " new.images: timeout"64 echo "detrend.reject: timeout" 70 65 end 71 66 end 72 67 73 68 # copy new images, sending job to desired host 74 task dettool.reject. process69 task dettool.reject.run 75 70 periods -poll 0.5 76 71 periods -exec 1.0 … … 78 73 79 74 task.exec 80 queuesize DetrendRejectExp -var N75 queuesize DetrendRejectExposure -var N 81 76 if ($N == 0) break 82 77 if ($network == 0) break 83 78 84 # look for new images on the internal DetrendRejectExp queue79 # look for new images on the internal DetrendRejectExposure queue 85 80 # caution with these 'if' statements: syntax errors 86 81 # will make the task fail without given a good status 87 queuepop DetrendRejectExp -var line -key 0 NEW82 queuepop DetrendRejectExposure -var line -key 0 NEW 88 83 if ("$line" == "NULL") break 89 84 90 85 strpop line state 91 queuepush DetrendRejectExp -replace -key 1:2 "RUN $line"86 queuepush DetrendRejectExposure -replace -key 1:2 "RUN $line" 92 87 93 ## the DetrendRejectExp queue contains:88 ## the DetrendRejectExposure queue contains: 94 89 ## STATE DET_ID ITER TYPE 95 90 ## NOTE: the queue has the STATE prepended … … 118 113 # success 119 114 task.exit 0 120 queuepush DetrendRejectExp -replace -key 1:2 "DONE $options:0"115 queuepush DetrendRejectExposure -replace -key 1:2 "DONE $options:0" 121 116 end 122 117 123 118 # default exit status 124 119 task.exit default 125 queuepush DetrendRejectExp -replace -key 1:2 "FAIL $options:0"120 queuepush DetrendRejectExposure -replace -key 1:2 "FAIL $options:0" 126 121 end 127 122 128 123 # operation times out? 129 124 task.exit timeout 130 queuepush DetrendRejectExp -replace -key 1:2 "TIMEOUT $options:0"125 queuepush DetrendRejectExposure -replace -key 1:2 "TIMEOUT $options:0" 131 126 end 132 127 end -
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 -
trunk/ippTasks/detrend.stack.pro
r9081 r9104 15 15 ## STATE DET_ID ITER TYPE CLASS_ID CAMERA 16 16 17 queueinit Detrend ClassIDtoStack17 queueinit DetrendStackClass 18 18 if ($?network == 0) 19 19 $network = 1 … … 24 24 25 25 # select images ready for copy 26 # new entries are added to queue Detrend ClassIDtoStack26 # new entries are added to queue DetrendStackClass 27 27 # compare the new list with the ones already selected 28 28 task dettool.stack.load … … 54 54 $CLASS_ID = $word:3 55 55 $CAMERA = $word:4 56 echo queuepush Detrend ClassIDtoStack-uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID $CAMERA"57 queuepush Detrend ClassIDtoStack-uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID $CAMERA"56 echo queuepush DetrendStackClass -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID $CAMERA" 57 queuepush DetrendStackClass -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID $CAMERA" 58 58 end 59 59 60 60 # delete existing entries which are DONE 61 queuedrop Detrend ClassIDtoStack-key 0 DONE61 queuedrop DetrendStackClass -key 0 DONE 62 62 end 63 63 64 64 # locked list 65 task.exit 166 echo "new.images: exec failure"67 end68 69 # default exit status70 65 task.exit default 71 echo " new.images: unknown exit status: $EXIT"66 echo "detrend.stack: failure" 72 67 end 73 68 74 69 # operation times out? 75 70 task.exit timeout 76 echo " new.images: timeout"71 echo "detrend.stack: timeout" 77 72 end 78 73 end 79 74 80 75 # copy new images, sending job to desired host 81 task dettool.stack. process76 task dettool.stack.run 82 77 periods -poll 0.5 83 78 periods -exec 1.0 … … 85 80 86 81 task.exec 87 queuesize Detrend ClassIDtoStack-var N82 queuesize DetrendStackClass -var N 88 83 89 84 if ($N == 0) break 90 85 if ($network == 0) break 91 86 92 # look for new images on the internal Detrend ClassIDtoStackqueue87 # look for new images on the internal DetrendStackClass queue 93 88 # caution with these 'if' statements: syntax errors 94 89 # will make the task fail without given a good status 95 queuepop Detrend ClassIDtoStack-var line -key 0 NEW90 queuepop DetrendStackClass -var line -key 0 NEW 96 91 if ("$line" == "NULL") break 97 92 98 93 strpop line state 99 queuepush Detrend ClassIDtoStack-replace -key 1:2:4 "RUN $line"94 queuepush DetrendStackClass -replace -key 1:2:4 "RUN $line" 100 95 101 # the Detrend ClassIDtoStackqueue contains:96 # the DetrendStackClass queue contains: 102 97 # STATE DET_ID ITER TYPE CLASS_ID 103 98 ## NOTE: the queue has the STATE prepended … … 108 103 $TYPE = $word:2 109 104 $CLASS_ID = $word:3 110 $CAMERA = $word: 3105 $CAMERA = $word:4 111 106 112 107 stdout $CAMERA.$TYPE.$DET_ID.$ITER.$CLASS_ID.log … … 129 124 # success 130 125 task.exit 0 131 queuepush Detrend ClassIDtoStack-replace -key 1:2:4 "DONE $options:0"126 queuepush DetrendStackClass -replace -key 1:2:4 "DONE $options:0" 132 127 end 133 128 134 129 # default exit status 135 130 task.exit default 136 queuepush Detrend ClassIDtoStack-replace -key 1:2:4 "FAIL $options:0"131 queuepush DetrendStackClass -replace -key 1:2:4 "FAIL $options:0" 137 132 end 138 133 139 134 # operation times out? 140 135 task.exit timeout 141 queuepush Detrend ClassIDtoStack-replace -key 1:2:4 "TIMEOUT $options:0"136 queuepush DetrendStackClass -replace -key 1:2:4 "TIMEOUT $options:0" 142 137 end 143 138 end -
trunk/ippTasks/pantasks.pro
r9081 r9104 40 40 end 41 41 42 macro step2.flat 43 exec dettool -definebyquery -det_type flat -exp_type flat -camera isp 44 input $scripts/detrend.process.pro 45 run 46 end 47 42 48 macro step2.both 43 49 exec dettool -definebyquery -det_type bias -exp_type bias -camera isp 44 50 exec dettool -definebyquery -det_type dark -exp_type dark -camera isp 51 exec dettool -definebyquery -det_type flat -exp_type flat -camera isp 45 52 input $scripts/detrend.process.pro 46 53 run … … 49 56 macro step3 50 57 input $scripts/detrend.stack.pro 58 input $scripts/detrend.norm.pro 51 59 input $scripts/detrend.resid.pro 52 60 input $scripts/detrend.reject.pro -
trunk/ippTasks/phase0.pro
r9081 r9104 2 2 ## this file contains the tasks for running the phase 0 stage 3 3 4 ## these tasks use the queue Phase0 PendingImfiles5 ## the Phase0 PendingImfiles queue contains:4 ## these tasks use the queue Phase0Imfiles 5 ## the Phase0Imfiles queue contains: 6 6 ## STATE EXP_KEY CLASS CLASS_ID URI-FITS 7 7 ## queue keys are counted from 0 8 8 9 queueinit Phase0 PendingImfiles10 queueinit Phase0 PendingExposures9 queueinit Phase0Imfiles 10 queueinit Phase0Exposures 11 11 if ($?network == 0) 12 12 $network = 1 … … 17 17 18 18 # select images ready for phase0 analysis 19 # new entries are added to queue Phase0 PendingImfiles19 # new entries are added to queue Phase0Imfiles 20 20 # compare the new list with the ones already selected 21 21 task phase0.imfile.load … … 36 36 # save stdout and stderr 37 37 38 # compare output with Phase0 PendingImfiles queue38 # compare output with Phase0Imfiles queue 39 39 # only add entries which don't exist in queue 40 40 queuesize stdout -var Nqueue 41 41 for i 0 $Nqueue 42 42 queuepop stdout -var line 43 queuepush Phase0 PendingImfiles -uniq -key 1 "NEW $line"43 queuepush Phase0Imfiles -uniq -key 1 "NEW $line" 44 44 end 45 45 46 46 # delete existing entries which are DONE 47 queuedrop Phase0 PendingImfiles -key 0 DONE47 queuedrop Phase0Imfiles -key 0 DONE 48 48 end 49 49 50 50 # locked list 51 51 task.exit default 52 echo " ***phase0 pending imfiles: failure"53 end 54 55 # operation times out? 56 task.exit timeout 57 echo " ***phase0 pending imfiles: timeout"52 echo "phase0 pending imfiles: failure" 53 end 54 55 # operation times out? 56 task.exit timeout 57 echo "phase0 pending imfiles: timeout" 58 58 end 59 59 end 60 60 61 61 # run the phase0imfile script on pending images 62 task phase0.imfile. process62 task phase0.imfile.run 63 63 periods -poll 0.5 64 64 periods -exec 1 … … 66 66 67 67 task.exec 68 queuesize Phase0 PendingImfiles -var N68 queuesize Phase0Imfiles -var N 69 69 if ($N == 0) break 70 70 if ($network == 0) break … … 73 73 # caution with these 'if' statements: syntax errors 74 74 # will make the task fail without given a good status 75 queuepop Phase0 PendingImfiles -var line -key 0 NEW75 queuepop Phase0Imfiles -var line -key 0 NEW 76 76 if ("$line" == "NULL") break 77 77 78 78 strpop line state 79 queuepush Phase0 PendingImfiles -replace -key 1 "RUN $line"80 81 ## the Phase0 PendingImfiles queue contains (line has popped STATE)79 queuepush Phase0Imfiles -replace -key 1 "RUN $line" 80 81 ## the Phase0Imfiles queue contains (line has popped STATE) 82 82 ## STATE EXP_KEY CLASS CLASS_ID URI-FITS 83 83 list word -split $line … … 103 103 task.exit 0 104 104 # phase0imfile.pl updates DB tables, here we just update the queue 105 queuepush Phase0 PendingImfiles -replace -key 1 "DONE $options:0"105 queuepush Phase0Imfiles -replace -key 1 "DONE $options:0" 106 106 end 107 107 … … 109 109 task.exit default 110 110 echo "failure for phase0imfile.pl: $options:0" 111 queuepush Phase0 PendingImfiles -replace -key 1 "FAIL $options:0"111 queuepush Phase0Imfiles -replace -key 1 "FAIL $options:0" 112 112 end 113 113 … … 115 115 task.exit timeout 116 116 echo "timeout for phase0imfile.pl: $options:0" 117 queuepush Phase0 PendingImfiles -replace -key 1 "TIMEOUT $options:0"118 end 119 end 120 121 ## these tasks use the queue Phase0 PendingExposures122 ## the Phase0 PendingExposures queue contains:117 queuepush Phase0Imfiles -replace -key 1 "TIMEOUT $options:0" 118 end 119 end 120 121 ## these tasks use the queue Phase0Exposures 122 ## the Phase0Exposures queue contains: 123 123 ## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS 124 124 125 125 # select images ready for phase0 analysis 126 # new entries are added to queue Phase0 PendingExposures126 # new entries are added to queue Phase0Exposures 127 127 # compare the new list with the ones already selected 128 128 task phase0.exp.load … … 141 141 local i Nqueue 142 142 143 # compare output with Phase0 PendingExposures queue143 # compare output with Phase0Exposures queue 144 144 # only add entries which don't exist in queue 145 145 queuesize stdout -var Nqueue 146 146 for i 0 $Nqueue 147 147 queuepop stdout -var line 148 queuepush Phase0 PendingExposures -uniq -key 1 "NEW $line"148 queuepush Phase0Exposures -uniq -key 1 "NEW $line" 149 149 end 150 150 151 151 # delete existing entries which are DONE 152 queuedrop Phase0 PendingExposures -key 0 DONE152 queuedrop Phase0Exposures -key 0 DONE 153 153 end 154 154 … … 165 165 166 166 # run the phase0imfile script on pending images 167 task phase0.exp. process167 task phase0.exp.run 168 168 periods -poll 0.5 169 169 periods -exec 1.0 … … 171 171 172 172 task.exec 173 queuesize Phase0 PendingExposures -var N173 queuesize Phase0Exposures -var N 174 174 if ($N == 0) break 175 175 if ($network == 0) break … … 178 178 # caution with these 'if' statements: syntax errors 179 179 # will make the task fail without given a good status 180 queuepop Phase0 PendingExposures -var line -key 0 NEW180 queuepop Phase0Exposures -var line -key 0 NEW 181 181 if ("$line" == "NULL") break 182 182 183 183 strpop line state 184 queuepush Phase0 PendingExposures -replace -key 1 "RUN $line"185 186 ## the Phase0 PendingExposures queue contains:184 queuepush Phase0Exposures -replace -key 1 "RUN $line" 185 186 ## the Phase0Exposures queue contains: 187 187 ## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS 188 188 list word -split $line … … 208 208 task.exit 0 209 209 # phase0exp.pl updates DB tables, here we just update the queue 210 queuepush Phase0 PendingExposures -replace -key 1 "DONE $options:0"210 queuepush Phase0Exposures -replace -key 1 "DONE $options:0" 211 211 end 212 212 213 213 # default exit status 214 214 task.exit default 215 queuepush Phase0 PendingExposures -replace -key 1 "FAIL $options:0"216 end 217 218 # operation times out? 219 task.exit timeout 220 queuepush Phase0 PendingExposures -replace -key 1 "TIMEOUT $options:0"215 queuepush Phase0Exposures -replace -key 1 "FAIL $options:0" 216 end 217 218 # operation times out? 219 task.exit timeout 220 queuepush Phase0Exposures -replace -key 1 "TIMEOUT $options:0" 221 221 end 222 222 end
Note:
See TracChangeset
for help on using the changeset viewer.
