- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/flatcorr.pro (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/ippTasks/flatcorr.pro
r24139 r27840 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.addcamera20 active true21 end22 task flatcorr.load23 active true24 end25 task flatcorr.run26 active true27 end28 end29 30 macro flatcorr.off31 task flatcorr.addcamera32 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_addcamera_DB = 044 $flatcorr_pendingprocess_DB = 045 4 46 5 # a flat-field correction run is initiated (manually) with a command like: … … 55 14 # as the chip analysis progresses, we need to occasionally migrate the 56 15 # completed chips to the camera stage by calling: 57 # flatcorr -addcamera 58 59 # we wait for the completed chip and camera analysis and search for 16 # flatcorr -advancecamera 17 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 … … 67 30 # flatcorr -addprocess -fault N 68 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 macro flatcorr.proc.on 76 task flatcorr.load 77 active true 78 end 79 task flatcorr.run 80 active true 81 end 82 end 83 84 macro flatcorr.proc.off 85 task flatcorr.load 86 active false 87 end 88 task flatcorr.run 89 active false 90 end 91 end 92 93 # these variables will cycle through the known ippdb database names 94 $flatcorr_advancecamera_DB = 0 95 $flatcorr_advanceaddstar_DB = 0 96 $flatcorr_pendingprocess_DB = 0 97 69 98 # migrate complete flatcorr chips to the camera stage analysis 70 task flatcorr.ad dcamera99 task flatcorr.advancecamera 71 100 host local 72 101 … … 80 109 # define the command (does not depend on previous queries) 81 110 if ($DB:n == 0) 82 command flatcorr -ad dcamera111 command flatcorr -advancecamera 83 112 else 84 113 # save the DB name for the exit tasks 85 114 # note that this DB name refers to the ippdb, not the dvodb 86 option $DB:$flatcorr_addcamera_DB 87 command flatcorr -addcamera -dbname $DB:$flatcorr_addcamera_DB 88 $flatcorr_addcamera_DB ++ 89 if ($flatcorr_addcamera_DB >= $DB:n) set flatcorr_addcamera_DB = 0 115 option $DB:$flatcorr_advancecamera_DB 116 command flatcorr -advancecamera -dbname $DB:$flatcorr_advancecamera_DB 117 $flatcorr_advancecamera_DB ++ 118 if ($flatcorr_advancecamera_DB >= $DB:n) set flatcorr_advancecamera_DB = 0 119 end 120 end 121 122 # silently drop stdout 123 stdout NULL 124 stderr $LOGDIR/flatcorr.log 125 126 # success (no action required) 127 task.exit $EXIT_SUCCESS 128 end 129 130 # locked list 131 task.exit default 132 showcommand failure 133 end 134 135 task.exit crash 136 showcommand crash 137 end 138 139 # operation times out? 140 task.exit timeout 141 showcommand timeout 142 end 143 end 144 145 # migrate complete flatcorr exposures to the addstar process 146 task flatcorr.advanceaddstar 147 host local 148 149 # check the list of pending flatcorr runs 150 periods -poll 5 151 periods -exec 30 152 periods -timeout 60 153 npending 1 154 155 task.exec 156 # define the command (does not depend on previous queries) 157 if ($DB:n == 0) 158 command flatcorr -advanceaddstar 159 else 160 # save the DB name for the exit tasks 161 # note that this DB name refers to the ippdb, not the dvodb 162 option $DB:$flatcorr_advanceaddstar_DB 163 command flatcorr -advanceaddstar -dbname $DB:$flatcorr_advanceaddstar_DB 164 $flatcorr_advanceaddstar_DB ++ 165 if ($flatcorr_advanceaddstar_DB >= $DB:n) set flatcorr_advanceaddstar_DB = 0 90 166 end 91 167 end … … 175 251 task flatcorr.run 176 252 host local 253 npending 1 177 254 178 255 periods -poll $LOADPOLL 179 256 periods -exec $LOADEXEC 180 periods -timeout 60257 periods -timeout 3600 181 258 182 259 # silently drop stdout … … 202 279 book getword flatcorrBook $pageName region -var REGION 203 280 book getword flatcorrBook $pageName filter -var FILTER 281 book getword flatcorrBook $pageName make_corr -var MAKE_CORRECTION 204 282 book getword flatcorrBook $pageName dbname -var DBNAME 205 283 book getword flatcorrBook $pageName workdir -var WORKDIR_TEMPLATE 206 284 207 # specify choice of remote host208 # set a specific DVO host here209 if ($PARALLEL)210 host anyhost211 else212 host local213 end214 215 285 # save the pageName for future reference below 216 286 options $pageName … … 224 294 # XXX get these arguments right 225 295 $run = flatcorr_proc.pl --corr_id $CORR_ID --det_type $DET_TYPE --dvodb $DVODB --camera $CAMERA --region $REGION --filter $FILTER --workdir $outroot 296 if ("$MAKE_CORRECTION" == "T") 297 $run = $run --make_correction 298 end 226 299 add_standard_args run 227 300
Note:
See TracChangeset
for help on using the changeset viewer.
