Changeset 25816 for trunk/ippTasks/flatcorr.pro
- Timestamp:
- Oct 8, 2009, 5:09:53 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/flatcorr.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/flatcorr.pro
r25785 r25816 2 2 ## this file contains the tasks for running the flatcorr stage 3 3 ## these tasks use the book 'flatcorrBook' 4 5 # test for required global variables6 check.globals7 8 book init flatcorrBook9 10 macro flatcorr.reset11 book init flatcorrBook12 end13 14 macro flatcorr.status15 book listbook flatcorrBook16 end17 18 macro flatcorr.on19 task flatcorr.advancecamera20 active true21 end22 task flatcorr.load23 active true24 end25 task flatcorr.run26 active true27 end28 end29 30 macro flatcorr.off31 task flatcorr.advancecamera32 active false33 end34 task flatcorr.load35 active false36 end37 task flatcorr.run38 active false39 end40 end41 42 # these variables will cycle through the known ippdb database names43 $flatcorr_advancecamera_DB = 044 $flatcorr_pendingprocess_DB = 045 4 46 5 # a flat-field correction run is initiated (manually) with a command like: … … 57 16 # flatcorr -advancecamera 58 17 59 # we wait for the completed chip and camera analysis and search for 18 # as the camera analysis progresses, we need to occasionally migrate the 19 # completed exposures to the addstar stage by calling: 20 # flatcorr -advanceaddstar 21 22 # we wait for the completed addstar jobs and search for 60 23 # completed processing analysis with: 61 24 # flatcorr -pendingprocess … … 66 29 # and failures with: 67 30 # flatcorr -addprocess -fault N 31 32 # test for required global variables 33 check.globals 34 35 book init flatcorrBook 36 37 macro flatcorr.reset 38 book init flatcorrBook 39 end 40 41 macro flatcorr.status 42 book listbook flatcorrBook 43 end 44 45 macro flatcorr.on 46 task flatcorr.advancecamera 47 active true 48 end 49 task flatcorr.advanceaddstar 50 active true 51 end 52 task flatcorr.load 53 active true 54 end 55 task flatcorr.run 56 active true 57 end 58 end 59 60 macro flatcorr.off 61 task flatcorr.advancecamera 62 active false 63 end 64 task flatcorr.advanceaddstar 65 active false 66 end 67 task flatcorr.load 68 active false 69 end 70 task flatcorr.run 71 active false 72 end 73 end 74 75 # these variables will cycle through the known ippdb database names 76 $flatcorr_advancecamera_DB = 0 77 $flatcorr_advanceaddstar_DB = 0 78 $flatcorr_pendingprocess_DB = 0 68 79 69 80 # migrate complete flatcorr chips to the camera stage analysis … … 114 125 end 115 126 127 # migrate complete flatcorr exposures to the addstar process 128 task flatcorr.advanceaddstar 129 host local 130 131 # check the list of pending flatcorr runs 132 periods -poll 5 133 periods -exec 30 134 periods -timeout 60 135 npending 1 136 137 task.exec 138 # define the command (does not depend on previous queries) 139 if ($DB:n == 0) 140 command flatcorr -advanceaddstar 141 else 142 # save the DB name for the exit tasks 143 # note that this DB name refers to the ippdb, not the dvodb 144 option $DB:$flatcorr_advanceaddstar_DB 145 command flatcorr -advanceaddstar -dbname $DB:$flatcorr_advanceaddstar_DB 146 $flatcorr_advanceaddstar_DB ++ 147 if ($flatcorr_advanceaddstar_DB >= $DB:n) set flatcorr_advanceaddstar_DB = 0 148 end 149 end 150 151 # silently drop stdout 152 stdout NULL 153 stderr $LOGDIR/flatcorr.log 154 155 # success (no action required) 156 task.exit $EXIT_SUCCESS 157 end 158 159 # locked list 160 task.exit default 161 showcommand failure 162 end 163 164 task.exit crash 165 showcommand crash 166 end 167 168 # operation times out? 169 task.exit timeout 170 showcommand timeout 171 end 172 end 173 116 174 # create new flatcorr entries for the currently known DVO databases 117 175 # run this multiple times once an hour - on pass for each db … … 123 181 periods -exec $LOADEXEC 124 182 periods -timeout 60 125 active false126 183 npending 1 127 184 … … 180 237 periods -exec $LOADEXEC 181 238 periods -timeout 60 182 active false183 239 184 240 # silently drop stdout
Note:
See TracChangeset
for help on using the changeset viewer.
