Changeset 8691 for trunk/ippTasks/detrend.process.pro
- Timestamp:
- Aug 29, 2006, 2:28:33 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.process.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.process.pro
r8193 r8691 1 ## this file contains the tasks for running the detrend processing stage 1 2 2 ## this file contains the tasks for running the detrend processing stage 3 # query for pending imfiles to process: 4 # dettool -raw -simple 5 # 1 bias 850131b fpa mc 850131b.fits BIAS r.MP9601 1.656000 5.496118 0.349071 0.000000 1155.934692 107.037283 46.214947 37.160000 105.480000 -133.067001 0.000000 6 # this returns many columns for manual operations. we strip all but the first few: 7 8 # process a single imfile 9 # detrend_process.pl 1 850131b mc bias 850131b.fits 850131b 3 10 4 11 ## these tasks use the queue DetrendImfilesToProcess 5 12 ## the DetrendImfilesToProcess queue contains: 6 ## STATE .....13 ## STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 7 14 8 15 # select images ready for copy … … 10 17 # compare the new list with the ones already selected 11 18 task dettool.raw.load 12 command dettool -raw 19 command dettool -raw -simple 13 20 host local 14 21 … … 29 36 for i 0 $Nqueue 30 37 queuepop stdout -var line 31 queuepush DetrendImfilesToProcess -uniq -key 1:2:4 "NEW $line" 38 list word -split $line 39 $DET_ID = $word:0 40 $TYPE = $word:1 41 $EXP_KEY = $word:2 42 $CLASS = $word:3 43 $CLASS_ID = $word:4 44 $URI = $word:5 45 queuepush DetrendImfilesToProcess -uniq -key 1:3:5 "NEW $DET_ID $TYPE $EXP_KEY $CLASS $CLASS_ID $URI" 32 46 end 33 47 … … 70 84 71 85 strpop line state 72 queuepush DetrendImfilesToProcess -replace -key 0 "RUN $line" 86 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "RUN $line" 87 88 ## the DetrendImfilesToProcess queue contains: 89 # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 90 ## NOTE: the queue has the STATE prepended 91 list word -split $line 92 $DET_ID = $word:1 93 $TYPE = $word:2 94 $EXP_KEY = $word:3 95 $CLASS = $word:4 96 $CLASS_ID = $word:5 97 $URI = $word:6 73 98 74 99 # specify choice of remote host: 75 # 'anyhost' specified random remote host76 # if we needed to specify a host explicitly, use a command like77 # one of the following. the -required forces execution on the78 # named host, and blocks the task until the host is available79 # host kiawe80 # host alala -required81 100 host anyhost 82 83 # choose the default recipe appropriate to this type of file84 $recipe = `get.recipe $type`85 101 86 102 # create example job options as a demonstration 87 103 options "$line" 88 command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe 104 # ~/ipp/helpers/detrend_process.pl 1 850131b mc bias 850131b.fits 850131b 105 command detrend_process.pl $DET_ID $EXP_KEY $CLASS_ID $TYPE $URI $EXP_KEY 89 106 end 90 107 91 108 # success 92 109 task.exit 0 93 # XXX need to parse the options to identify the values below (if not part of cmdline?) 94 exec dettool -addprocessed -det_id $det_id -exp_id $exp_id -class_id $class_id -uri $output_uri -procrecipe $recipe 95 queuepush DetrendImfilesToProcess -replace -key 1:2:4 "DONE $options:0" 110 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "DONE $options:0" 96 111 end 97 112 98 113 # default exit status 99 114 task.exit default 100 queuepush DetrendImfilesToProcess -replace -key 0"FAIL $options:0"115 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "FAIL $options:0" 101 116 end 102 117 103 118 # operation times out? 104 119 task.exit timeout 105 queuepush DetrendImfilesToProcess -replace -key 0"FAIL $options:0"120 queuepush DetrendImfilesToProcess -replace -key 1:3:5 "FAIL $options:0" 106 121 end 107 122 end
Note:
See TracChangeset
for help on using the changeset viewer.
