Changeset 35350 for branches/eam_branches/ipp-20130307/ippTasks
- Timestamp:
- Apr 2, 2013, 3:01:21 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307
- Files:
-
- 5 edited
- 2 copied
-
. (modified) (1 prop)
-
ippTasks (modified) (1 prop)
-
ippTasks/addstar.pro (modified) (8 diffs)
-
ippTasks/lapgroup.pro (copied) (copied from trunk/ippTasks/lapgroup.pro )
-
ippTasks/minidvodb.pro (modified) (2 diffs)
-
ippTasks/release.pro (copied) (copied from trunk/ippTasks/release.pro )
-
ippTasks/survey.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307
- Property svn:mergeinfo changed
/trunk (added) merged: 35269-35270,35277,35294-35295,35297-35302,35304-35308,35311,35315,35317-35318,35325,35328-35332,35334-35335,35337
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130307/ippTasks
- Property svn:mergeinfo changed
/trunk/ippTasks (added) merged: 35305,35308,35331,35335
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130307/ippTasks/addstar.pro
r34804 r35350 6 6 check.globals 7 7 8 9 if ($?ADDSTAGES:n == 0) set ADDSTAGES:n = 0 10 11 12 8 13 book init addPendingExp 9 14 … … 17 22 18 23 macro addstar.on 19 task addstar.exp.load.stack 20 active true 21 end 22 task addstar.exp.load.cam 23 active true 24 end 25 task addstar.exp.load.staticsky 26 active true 27 end 28 task addstar.exp.load.skycal 24 task addstar.exp.load 29 25 active true 30 26 end … … 35 31 36 32 macro addstar.off 37 task addstar.exp.load.stack 38 active false 39 end 40 task addstar.exp.load.cam 41 active false 42 end 43 task addstar.exp.load.staticsky 44 active false 45 end 46 task addstar.exp.load.skycal 33 task addstar.exp.load 47 34 active false 48 35 end … … 83 70 84 71 72 #addstar stages 73 74 macro add.addstages 75 if ($0 != 2) 76 echo "USAGE: add.addstages (addstages)" 77 break 78 end 79 if ($?ADDSTAGES:n == 0) 80 list ADDSTAGES -add $1 81 return 82 end 83 84 local found 85 $found = 0 86 for i 0 $ADDSTAGES:n 87 if ($ADDSTAGES:$i == $1) 88 $found = 1 89 echo "$ADDSTAGES:$i set" 90 last 91 end 92 end 93 94 if ($found == 0) 95 list ADDSTAGES -add $1 96 end 97 end 98 99 macro del.addstages 100 if ($0 != 2) 101 echo "USAGE: del.addstages (addstages)" 102 break 103 end 104 if ($?ADDSTAGES:n == 0) 105 return 106 end 107 108 list ADDSTAGES -del $1 109 end 110 111 macro show.addstages 112 if ($0 != 1) 113 echo "USAGE: show.addstages" 114 break 115 end 116 if ($?ADDSTAGES:n == 0) 117 echo "no addstar stages defined" 118 end 119 if ($ADDSTAGES:n == 0) 120 echo "no addstar stages defined" 121 end 122 123 local i 124 for i 0 $ADDSTAGES:n 125 echo $ADDSTAGES:$i 126 end 127 end 128 129 macro stuff 130 echo $LOADEXEC_ADD 131 echo $LOADPOLL 132 end 133 85 134 # this variable will cycle through the known database names 86 135 $addstar_DB = 0 136 $addstar_stages_DB = 0 87 137 #this may not work for more databases (addstar) will do that later) 88 138 $addstar_revert_DB_C = 0 … … 92 142 $addstar_revert_DB_SC = 0 93 143 94 $LOADEXEX_ADD = 30095 144 #$LOADEXEC_ADD = 300 145 $LOADEXEC_ADD = 10 96 146 97 147 … … 99 149 # new entries are added to addPendingExp 100 150 # skip already-present entries 101 task addstar.exp.load .stack151 task addstar.exp.load 102 152 host local 103 153 … … 111 161 112 162 task.exec 113 # if ($LABEL:n == 0) break 114 $run = addtool -pendingexp -stage stack 115 if ($DB:n == 0) 116 option DEFAULT 117 else 118 # save the DB name for the exit tasks 119 option $DB:$addstar_DB 120 $run = $run -dbname $DB:$addstar_DB 121 $addstar_DB ++ 122 if ($addstar_DB >= $DB:n) set addstar_DB = 0 123 end 163 #if no stages defined we can't run 164 if ($ADDSTAGES:n == 0) echo "what" 165 # if ($ADDSTAGES:n == 0) break 166 $run = addtool -pendingexp 167 168 #option $ADDSTAGES:$addstar_stages_DB 169 $run = $run -stage $ADDSTAGES:$addstar_stages_DB 170 option $DB:$addstar_DB 171 $run = $run -dbname $DB:$addstar_DB 172 $addstar_stages_DB ++ 173 if ($addstar_stages_DB >= $ADDSTAGES:n) 174 set addstar_stages_DB = 0 175 $addstar_DB ++ 176 if ($addstar_DB >= $DB:n) set addstar_DB = 0 177 #go to next stage. if run out of stages, go to 0 stage and 178 #cycle through dbname, if run out of dbnames, go to 0 dbname 179 end 124 180 add_poll_args run 125 181 add_poll_labels run 182 echo $run 126 183 command $run 127 184 end … … 153 210 end 154 211 end 155 156 task addstar.exp.load.cam157 host local158 159 periods -poll $LOADPOLL160 periods -exec $LOADEXEC_ADD161 periods -timeout 300162 npending 1163 164 stdout NULL165 stderr $LOGDIR/addstar.exp.log166 167 task.exec168 # if ($LABEL:n == 0) break169 $run = addtool -pendingexp -stage cam170 if ($DB:n == 0)171 option DEFAULT172 else173 # save the DB name for the exit tasks174 option $DB:$addstar_DB175 $run = $run -dbname $DB:$addstar_DB176 $addstar_DB ++177 if ($addstar_DB >= $DB:n) set addstar_DB = 0178 end179 add_poll_args run180 add_poll_labels run181 command $run182 end183 184 # success185 task.exit 0186 # convert 'stdout' to book format187 ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT188 if ($VERBOSE > 2)189 book listbook addPendingExp190 end191 192 # delete existing entries in the appropriate pantaskStates193 process_cleanup addPendingExp194 end195 196 # default exit status197 task.exit default198 showcommand failure199 end200 201 task.exit crash202 showcommand crash203 end204 205 # operation times out?206 task.exit timeout207 showcommand timeout208 end209 end210 211 task addstar.exp.load.staticsky212 host local213 periods -poll $LOADPOLL214 periods -exec $LOADEXEC_ADD215 periods -timeout 300216 npending 1217 218 stdout NULL219 stderr $LOGDIR/addstar.exp.log220 221 task.exec222 # if ($LABEL:n == 0) break223 $run = addtool -pendingexp -stage staticsky224 if ($DB:n == 0)225 option DEFAULT226 else227 # save the DB name for the exit tasks228 option $DB:$addstar_DB229 $run = $run -dbname $DB:$addstar_DB230 $addstar_DB ++231 if ($addstar_DB >= $DB:n) set addstar_DB = 0232 end233 add_poll_args run234 add_poll_labels run235 command $run236 end237 238 # success239 task.exit 0240 # convert 'stdout' to book format241 ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT242 if ($VERBOSE > 2)243 book listbook addPendingExp244 end245 246 # delete existing entries in the appropriate pantaskStates247 process_cleanup addPendingExp248 end249 250 # default exit status251 task.exit default252 showcommand failure253 end254 255 task.exit crash256 showcommand crash257 end258 259 # operation times out?260 task.exit timeout261 showcommand timeout262 end263 end264 265 task addstar.exp.load.skycal266 host local267 periods -poll $LOADPOLL268 periods -exec $LOADEXEC_ADD269 periods -timeout 300270 npending 1271 272 stdout NULL273 stderr $LOGDIR/addstar.exp.log274 275 task.exec276 # if ($LABEL:n == 0) break277 $run = addtool -pendingexp -stage skycal278 if ($DB:n == 0)279 option DEFAULT280 else281 # save the DB name for the exit tasks282 option $DB:$addstar_DB283 $run = $run -dbname $DB:$addstar_DB284 $addstar_DB ++285 if ($addstar_DB >= $DB:n) set addstar_DB = 0286 end287 add_poll_args run288 add_poll_labels run289 command $run290 end291 292 # success293 task.exit 0294 # convert 'stdout' to book format295 ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT296 if ($VERBOSE > 2)297 book listbook addPendingExp298 end299 300 # delete existing entries in the appropriate pantaskStates301 process_cleanup addPendingExp302 end303 304 # default exit status305 task.exit default306 showcommand failure307 end308 309 task.exit crash310 showcommand crash311 end312 313 # operation times out?314 task.exit timeout315 showcommand timeout316 end317 end318 319 212 320 213 # run the addstar script on pending exposures -
branches/eam_branches/ipp-20130307/ippTasks/minidvodb.pro
r33706 r35350 145 145 book setword MINIDVODB_PREMERGE $1 MINIDVODB_GROUP $1 146 146 book setword MINIDVODB_PREMERGE $1 DVODB $3 147 book setword MINIDVODB_PREMERGE $1 CAMERA $5 147 148 book setword MINIDVODB_PREMERGE $1 STATE PENDING 148 149 #active … … 443 444 book getword minidvodbPreMergelist $pageName minidvodb_group -var MINIDVODB_GROUP 444 445 book getword minidvodbPreMergelist $pageName minidvodb_path -var MINIDVODB_PATH 446 book getword minidvodbPreMergelist $pageName camera -var CAMERA 445 447 book getword minidvodbPreMergelist $pageName state -var STATE 446 448 stdout $LOGDIR/minidvodb.premerge.run.log 447 449 stderr $LOGDIR/minidvodb.premerge.run.log 448 450 449 $run = minidvodb_premerge.pl --camera GPC1--minidvodb $MINIDVODB_PATH --minidvodb_group $MINIDVODB_GROUP --minidvodb_id $MINIDVODB_ID451 $run = minidvodb_premerge.pl --camera $CAMERA --minidvodb $MINIDVODB_PATH --minidvodb_group $MINIDVODB_GROUP --minidvodb_id $MINIDVODB_ID 450 452 451 453 if ($DB:n == 0) -
branches/eam_branches/ipp-20130307/ippTasks/survey.pro
r34976 r35350 18 18 book create SURVEY_STATICSKYSINGLE 19 19 book create SURVEY_SKYCAL 20 book create SURVEY_LAPGROUP 20 21 $haveSurveyBooks = TRUE 21 22 end … … 33 34 $SURVEY_PUBLISH_DB = 0 34 35 $SURVEY_SKYCAL_DB = 0 36 $SURVEY_LAPGROUP_DB = 0 35 37 $SURVEY_STATICSKYSINGLE_DB = 0 36 38 $SURVEY_EXEC = 120 … … 78 80 active true 79 81 end 82 task survey.lapgroup 83 active true 84 end 80 85 end 81 86 … … 118 123 end 119 124 task survey.skycal 125 active false 126 end 127 task survey.lapgroup 120 128 active false 121 129 end … … 494 502 macro survey.show.skycal 495 503 if ($0 != 1) 496 echo "USAGE: survey.show.sky acl"504 echo "USAGE: survey.show.skycal" 497 505 break 498 506 end 499 507 book listbook SURVEY_SKYCAL 508 end 509 510 macro survey.add.lapgroup 511 if ($0 != 3) 512 echo "USAGE: survey.add.lapgroup (label) (seq_id)" 513 break 514 end 515 book newpage SURVEY_LAPGROUP $1 516 book setword SURVEY_LAPGROUP $1 LABEL $1 517 book setword SURVEY_LAPGROUP $1 SEQ_ID $2 518 book setword SURVEY_LAPGROUP $1 STATE PENDING 519 end 520 521 macro survey.del.lapgroup 522 if ($0 != 2) 523 echo "USAGE: survey.del.lapgroup (label)" 524 break 525 end 526 book delpage SURVEY_LAPGROUP $1 527 end 528 529 macro survey.show.lapgroup 530 if ($0 != 1) 531 echo "USAGE: survey.show.lapgroup" 532 break 533 end 534 book listbook SURVEY_LAPGROUP 500 535 end 501 536 … … 1561 1596 end 1562 1597 end 1598 1599 task survey.lapgroup 1600 host local 1601 1602 periods -poll $SURVEY_POLL 1603 periods -exec $SURVEY_EXEC 1604 periods -timeout $SURVEY_TIMEOUT 1605 npending 1 1606 1607 stdout $LOGDIR/survey.lapgroup.log 1608 stderr $LOGDIR/survey.lapgroup.log 1609 1610 task.exec 1611 book npages SURVEY_LAPGROUP -var N 1612 if ($N == 0) 1613 # echo "No labels for processing" 1614 break 1615 endif 1616 1617 book getpage SURVEY_LAPGROUP 0 -var label -key STATE NEW 1618 if ("$label" == "NULL") 1619 # All labels have been done --- reset 1620 # echo "Resetting labels" 1621 for i 0 $N 1622 book getpage SURVEY_LAPGROUP $i -var label 1623 book setword SURVEY_LAPGROUP $label STATE NEW 1624 end 1625 book getpage SURVEY_LAPGROUP 0 -var label -key STATE NEW 1626 1627 # Select different database 1628 $SURVEY_LAPGROUP ++ 1629 if ($SURVEY_LAPGROUP >= $DB:n) set SURVEY_LAPGROUP = 0 1630 end 1631 1632 book setword SURVEY_LAPGROUP $label STATE DONE 1633 book getword SURVEY_LAPGROUP $label SEQ_ID -var SEQ_ID 1634 1635 # For now the list of filters 1636 $run = laptool -definegroup -seq_id $SEQ_ID -set_label $label -filter g.00000 -filter r.00000 -filter i.00000 -filter z.00000 -filter y.00000 1637 1638 if ($DB:n == 0) 1639 option DEFAULT 1640 else 1641 $run = $run -dbname $DB:$SURVEY_LAPGROUP_DB 1642 option $DB:$SURVEY_LAPGROUP_DB 1643 end 1644 1645 # echo $run 1646 command $run 1647 end 1648 1649 # success 1650 task.exit 0 1651 # echo "Success" 1652 end 1653 1654 # locked list 1655 task.exit default 1656 showcommand failure 1657 end 1658 1659 task.exit crash 1660 showcommand crash 1661 end 1662 1663 # operation times out? 1664 task.exit timeout 1665 showcommand timeout 1666 end 1667 end
Note:
See TracChangeset
for help on using the changeset viewer.
