Changeset 10692 for trunk/ippTasks/detrend.resid.pro
- Timestamp:
- Dec 12, 2006, 11:58:21 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.resid.pro (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.resid.pro
r10543 r10692 23 23 end 24 24 25 $DetrendResidImfileFail = 0 26 $DetrendResidExpFail = 0 27 28 if ($?VERBOSE == 0) 29 echo "VERBOSE not defined: load pantasks.pro first" 30 break 31 end 32 if ($?LOGDIR == 0) 33 echo "LOGDIR not defined: load pantasks.pro first" 34 break 35 end 36 $LOGSUBDIR = $LOGDIR/detrend 37 exec mkdir -p $LOGSUBDIR 38 39 macro detresid.status 40 queueprint DetrendResidImfiles 41 queueprint DetrendResidExposures 42 echo "DetrendResidImfileFail: $DetrendResidImfileFail" 43 echo "DetrendResidExpFail: $DetrendResidExpFail" 44 end 45 25 46 # select images ready for copy 26 47 # new entries are added to queue DetrendResidImfiles 27 48 # compare the new list with the ones already selected 28 49 task dettool.resid.load 29 command dettool -toresidimfile -simple30 50 host local 31 51 … … 34 54 periods -timeout 30 35 55 36 stdout dettool.resid.log 37 stderr dettool.resid.log 56 stdout $LOGSUBDIR/detresid.log 57 stderr $LOGSUBDIR/detresid.log 58 59 task.exec 60 command dettool -toresidimfile -simple -limit {$DetrendResidImfileFail + 20} 61 end 38 62 39 63 # success … … 48 72 for i 0 $Nqueue 49 73 queuepop stdout -var line 74 if ($VERBOSE > 2) 75 echo $line 76 end 50 77 list word -split $line 51 78 $DET_ID = $word:0 … … 70 97 # default exit status 71 98 task.exit default 72 echo "detrend.resid: failure" 99 if ($VERBOSE) 100 echo "detrend.resid: failure" 101 end 73 102 end 74 103 75 104 # operation times out? 76 105 task.exit timeout 77 echo "detrend.resid: timeout" 106 if ($VERBOSE) 107 echo "detrend.resid: timeout" 108 end 78 109 end 79 110 end … … 113 144 $CAMERA = $word:8 114 145 115 $ DET_DIR = `dirname $URI_IN`116 $LOG_DIR = $WORKDIR/$DET_DIR117 118 stdout $LOG _DIR/$EXP_TAG.detresid.$DET_ID.$ITER.$CLASS_ID.log119 stderr $LOG _DIR/$EXP_TAG.detresid.$DET_ID.$ITER.$CLASS_ID.log146 $word = `basename $EXP_TAG | tr '.' ' '` 147 list word -split $word 148 $base = $word:0 149 stdout $LOGSUBDIR/$base/$EXP_TAG.detresid.$DET_ID.$ITER.$CLASS_ID.log 150 stderr $LOGSUBDIR/$base/$EXP_TAG.detresid.$DET_ID.$ITER.$CLASS_ID.log 120 151 121 152 # specify choice of remote host: … … 130 161 # detrend_create_resid.pl DET_ID ITER EXP_TAG CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_TAG ???) 131 162 # need to parse the subdir path for the detrend URL 132 $DET_URL = $DET_DIR/$CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits133 echo command detrend_resid.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_UR L --input_uri $URI_IN--camera $CAMERA --mode $MODE134 command detrend_resid.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_UR L --input_uri $URI_IN--camera $CAMERA --mode $MODE163 # $DET_URL = $DET_DIR/$CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits 164 echo command detrend_resid.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE 165 command detrend_resid.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE 135 166 end 136 167 … … 142 173 # default exit status 143 174 task.exit default 175 if ($VERBOSE) 176 echo "failure detrend_resid.pl $options:0" 177 end 144 178 queuepush DetrendResidImfiles -replace -key 1:2:5:6 "FAIL $options:0" 179 $DetrendResidImfileFail ++ 145 180 end 146 181 147 182 # operation times out? 148 183 task.exit timeout 184 if ($VERBOSE) 185 echo "failure detrend_resid.pl $options:0" 186 end 149 187 queuepush DetrendResidImfiles -replace -key 1:2:6:6 "TIMEOUT $options:0" 188 $DetrendResidImfileFail ++ 150 189 end 151 190 end … … 155 194 # compare the new list with the ones already selected 156 195 task dettool.residexp.load 157 command dettool -toresidexp -simple158 196 host local 159 197 … … 162 200 periods -timeout 30 163 201 164 stdout dettool.residexp.log 165 stderr dettool.residexp.log 202 stdout $LOGSUBDIR/detresid.exp.log 203 stderr $LOGSUBDIR/detresid.exp.log 204 205 task.exec 206 command dettool -toresidexp -simple -limit {$DetrendResidExpFail + 20} 207 end 166 208 167 209 # success … … 176 218 for i 0 $Nqueue 177 219 queuepop stdout -var line 220 if ($VERBOSE > 2) 221 echo $line 222 end 178 223 list word -split $line 179 224 $DET_ID = $word:0 … … 194 239 # default exit status 195 240 task.exit default 196 echo "detrend.residexp: failure" 241 if ($VERBOSE) 242 echo "detrend.residexp: failure" 243 end 197 244 end 198 245 199 246 # operation times out? 200 247 task.exit timeout 201 echo "detrend.residexp: timeout" 248 if ($VERBOSE) 249 echo "detrend.residexp: timeout" 250 end 202 251 end 203 252 end … … 235 284 $CAMERA = $word:6 236 285 237 # XXX add $WORKDIR/$LOG_DIR 238 stdout $EXP_TAG.detresid.$DET_ID.$ITER.log 239 stderr $EXP_TAG.detresid.$DET_ID.$ITER.log 286 # XXX this is still a lame rule 287 $word = `basename $EXP_TAG | tr '.' ' '` 288 list word -split $word 289 $base = $word:0 290 291 stdout $LOGSUBDIR/$base/$EXP_TAG.detresid.$DET_ID.$ITER.log 292 stderr $LOGSUBDIR/$base/$EXP_TAG.detresid.$DET_ID.$ITER.log 293 exec mkdir -p $LOGSUBDIR/$base 240 294 241 295 # specify choice of remote host: … … 248 302 # create example job options as a demonstration 249 303 options "$line" 250 echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 304 if ($VERBOSE > 1) 305 echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 306 end 251 307 command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITER --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 252 308 end … … 259 315 # default exit status 260 316 task.exit default 317 if ($VERBOSE) 318 echo "failure for detrend_reject_imfile.pl: $options:0" 319 end 261 320 queuepush DetrendResidExposures -replace -key 1:2:5 "FAIL $options:0" 321 $DetrendResidExpFail ++ 262 322 end 263 323 264 324 # operation times out? 265 325 task.exit timeout 326 if ($VERBOSE) 327 echo "failure for detrend_reject_imfile.pl: $options:0" 328 end 266 329 queuepush DetrendResidExposures -replace -key 1:2:5 "TIMEOUT $options:0" 267 end 268 end 330 $DetrendResidExpFail ++ 331 end 332 end
Note:
See TracChangeset
for help on using the changeset viewer.
