Changeset 8691
- Timestamp:
- Aug 29, 2006, 2:28:33 PM (20 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 2 added
- 4 edited
-
detrend.assess.pro (modified) (5 diffs)
-
detrend.process.pro (modified) (4 diffs)
-
detrend.reject.pro (added)
-
detrend.resid.pro (modified) (5 diffs)
-
detrend.stack.pro (modified) (5 diffs)
-
phase0.pro (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.assess.pro
r8193 r8691 1 1 2 ## this file contains the tasks for running the detrend normalizationstage2 ## this file contains the tasks for running the detrend processing stage 3 3 4 ## these tasks use the queue DetrendRunToAssess 4 # dettool -toresidexp -simple 5 # 1 0 bias 850131b T 6 # DET_ID ITER TYPE EXP_KEY INCLUDE 7 8 # detrend_reject_imfile.pl 1 0 850131b bias 9 # detrend_reject_imfile.pl DET_ID ITER EXP_KEY TYPE 10 11 ## these tasks use the queue DetrendResidExp 12 ## the DetrendResidExp queue contains: 13 ## STATE DET_ID ITER TYPE EXP_KEY INCLUDE 5 14 6 15 # select images ready for copy 7 # new entries are added to queue DetrendR unToAssess16 # new entries are added to queue DetrendResidExp 8 17 # compare the new list with the ones already selected 9 18 task dettool.assess.load 10 command dettool - stacked -runs19 command dettool -toresidexp -simple 11 20 host local 12 21 … … 17 26 # success 18 27 task.exit 0 19 # XXX is it necessary for these to be local?20 # drop after this task macro is done?21 28 local i Nqueue 22 29 … … 26 33 for i 0 $Nqueue 27 34 queuepop stdout -var line 28 queuepush DetrendRunToAssess -uniq -key 1:2:4 "NEW $line" 35 list word -split $line 36 $DET_ID = $word:0 37 $ITER = $word:1 38 $TYPE = $word:2 39 $EXP_KEY = $word:3 40 $INCLUDE = $word:4 41 queuepush DetrendResidExp -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $EXP_KEY $INCLUDE" 29 42 end 30 43 31 44 # delete existing entries which are DONE 32 queuedrop DetrendR unToAssess-key 0 DONE45 queuedrop DetrendResidExp -key 0 DONE 33 46 end 34 47 … … 50 63 51 64 # copy new images, sending job to desired host 52 task dettool. assess.process65 task dettool.resid.process 53 66 periods -poll 0.5 54 67 periods -exec 1.0 … … 56 69 57 70 task.exec 58 queuesize DetrendRunToAssess -var N 59 71 queuesize DetrendResidExp -var N 60 72 if ($N == 0) break 61 73 if ($network == 0) break 62 74 63 # look for new images on the internal DetrendR unToAssessqueue75 # look for new images on the internal DetrendResidExp queue 64 76 # caution with these 'if' statements: syntax errors 65 77 # will make the task fail without given a good status 66 queuepop DetrendR unToAssess-var line -key 0 NEW78 queuepop DetrendResidExp -var line -key 0 NEW 67 79 if ("$line" == "NULL") break 68 80 69 81 strpop line state 70 queuepush DetrendRunToAssess -replace -key 0 "RUN $line" 82 queuepush DetrendResidExp -replace -key 1:2:4 "RUN $line" 83 84 ## the DetrendResidExp queue contains: 85 ## STATE DET_ID ITER TYPE EXP_KEY INCLUDE 86 ## NOTE: the queue has the STATE prepended 87 list word -split $line 88 $DET_ID = $word:1 89 $ITER = $word:2 90 $TYPE = $word:3 91 $EXP_KEY = $word:4 92 $INCLUDE = $word:5 71 93 72 94 # specify choice of remote host: 73 # 'anyhost' specified random remote host74 # if we needed to specify a host explicitly, use a command like75 # one of the following. the -required forces execution on the76 # named host, and blocks the task until the host is available77 # host kiawe78 # host alala -required79 95 host anyhost 80 81 # choose the default recipe appropriate to this type of file82 $recipe = `get.recipe $type`83 96 84 97 # create example job options as a demonstration 85 98 options "$line" 86 87 # we can put the dettool and ppMerge commands here, or wrap them in a single script 88 # $urilist = `dettool -stacked -det_id $det_id -iteration $iteration -chip" 89 # $uri_out = ??? 90 # command ppNorm $uri_out $uri $uri ... -recipe PPMERGE $recipe ??? 91 command ASSESS?? $uri_out -det_id $det_id -iteration $iteration -recipe PPMERGE $recipe 99 # detrend_reject_imfile.pl 1 0 850131b bias 100 # detrend_reject_imfile.pl DET_ID ITER EXP_KEY TYPE 101 command detrend_reject_imfile.pl $DET_ID $ITER $EXP_KEY $TYPE 92 102 end 93 103 94 104 # success 95 105 task.exit 0 96 # XXX need to parse the options to identify the values below (if not part of cmdline?) 97 exec dettool -addstacked -det_id $det_id -iteration $iteration -class_id $class_id -procrecipe $recipe 98 queuepush DetrendRunToAssess -replace -key 1:2:4 "DONE $options:0" 106 queuepush DetrendResidExp -replace -key 1:2:4 "DONE $options:0" 99 107 end 100 108 101 109 # default exit status 102 110 task.exit default 103 queuepush DetrendR unToAssess -replace -key 0"FAIL $options:0"111 queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0" 104 112 end 105 113 106 114 # operation times out? 107 115 task.exit timeout 108 queuepush DetrendR unToAssess -replace -key 0"FAIL $options:0"116 queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0" 109 117 end 110 118 end -
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 -
trunk/ippTasks/detrend.resid.pro
r8193 r8691 2 2 ## this file contains the tasks for running the detrend processing stage 3 3 4 # dettool -toresid -simple 5 # 0 bias 1 850131b mc o_850131b.mc.fit PPIMAGE_O 1.492870 2.848350 292.565582 6 # ITER TYPE DET_ID EXP_KEY CLASS_ID URI-IN 7 8 # detrend_create_resid.pl 1 0 850131b mc bias bias_mc_1_0.fit o_850131b.mc.fit 850131b 9 # detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_KEY) 10 # URL-DET: $TYPE\_$CLASS_ID\_$DET_ID\_$ITER.fit 11 4 12 ## these tasks use the queue DetrendResidImfiles 5 13 ## the DetrendResidImfiles queue contains: 6 ## STATE .....14 ## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN 7 15 8 16 # select images ready for copy … … 10 18 # compare the new list with the ones already selected 11 19 task dettool.resid.load 12 command dettool - resid20 command dettool -toresid -simple 13 21 host local 14 22 … … 16 24 periods -exec 5 17 25 periods -timeout 30 18 trange 18:00 23:5919 26 20 27 # success … … 29 36 for i 0 $Nqueue 30 37 queuepop stdout -var line 31 queuepush DetrendResidImfiles -uniq -key 1:2:4 "NEW $line" 38 list word -split $line 39 $ITER = $word:0 40 $TYPE = $word:1 41 $DET_ID = $word:2 42 $EXP_KEY = $word:3 43 $CLASS_ID = $word:4 44 $URI_IN = $word:5 45 queuepush DetrendResidImfiles -uniq -key 1:3:4:5 "NEW $ITER $TYPE $DET_ID $EXP_KEY $CLASS_ID $URI_IN" 32 46 end 33 47 … … 70 84 71 85 strpop line state 72 queuepush DetrendResidImfiles -replace -key 0 "RUN $line" 86 queuepush DetrendResidImfiles -replace -key 1:3:4:5 "RUN $line" 87 88 ## the DetrendResidImfiles queue contains: 89 ## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN 90 ## NOTE: the queue has the STATE prepended 91 list word -split $line 92 $ITER = $word:1 93 $TYPE = $word:2 94 $DET_ID = $word:3 95 $EXP_KEY = $word:4 96 $CLASS_ID = $word:5 97 $URI_IN = $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 89 # need to choose different variations based on the type 90 # need to supply the matched detrend images... 91 command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe -bias $master 92 command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe -flat $master 104 # detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_KEY ???) 105 $URL_DET = $TYPE\_$CLASS_ID\_$DET_ID\_$ITER.fit 106 command detrend_create_resid.pl $DET_ID $ITER $EXP_KEY $CLASS_ID $TYPE $URI_DET $URL_IN $EXP_KEY 93 107 end 94 108 95 109 # success 96 110 task.exit 0 97 # XXX need to parse the options to identify the values below (if not part of cmdline?) 98 exec dettool -addprocessed -det_id $det_id -exp_id $exp_id -class_id $class_id -uri $output_uri -procrecipe $recipe 99 queuepush DetrendResidImfiles -replace -key 1:2:4 "DONE $options:0" 111 queuepush DetrendResidImfiles -replace -key 1:3:4:5 "DONE $options:0" 100 112 end 101 113 102 114 # default exit status 103 115 task.exit default 104 queuepush DetrendResidImfiles -replace -key 0"FAIL $options:0"116 queuepush DetrendResidImfiles -replace -key 1:3:4:5 "FAIL $options:0" 105 117 end 106 118 107 119 # operation times out? 108 120 task.exit timeout 109 queuepush DetrendResidImfiles -replace -key 0"FAIL $options:0"121 queuepush DetrendResidImfiles -replace -key 1:3:4:5 "FAIL $options:0" 110 122 end 111 123 end -
trunk/ippTasks/detrend.stack.pro
r8193 r8691 1 2 1 ## this file contains the tasks for running the detrend stacking stage 3 2 3 # get a list of imfiles to stack 4 # dettool -tostack -simple 5 # 1 0 bias mc 6 # DET_ID ITER TYPE CLASS_ID 7 8 # function to stack the imfiles: 9 # detrend_stack.pl 1 0 mc bias 10 4 11 ## these tasks use the queue DetrendClassIDtoStack 12 13 ## these tasks use the queue DetrendImfilesToProcess 14 ## the DetrendClassIDtoStack queue contains: 15 ## STATE DET_ID ITER TYPE CLASS_ID 5 16 6 17 # select images ready for copy … … 8 19 # compare the new list with the ones already selected 9 20 task dettool.stack.load 10 command dettool - chip -processed21 command dettool -tostack -simple 11 22 host local 12 23 … … 22 33 23 34 # compare output with newImage queue 24 # only add entries which do n't exist in queue35 # only add entries which do not exist in queue 25 36 queuesize stdout -var Nqueue 26 37 for i 0 $Nqueue 27 38 queuepop stdout -var line 28 queuepush DetrendClassIDtoStack -uniq -key 1:2:4 "NEW $line" 39 list word -split $line 40 $DET_ID = $word:0 41 $ITER = $word:1 42 $TYPE = $word:2 43 $CLASS_ID = $word:3 44 queuepush DetrendClassIDtoStack -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID" 29 45 end 30 46 … … 68 84 69 85 strpop line state 70 queuepush DetrendClassIDtoStack -replace -key 0 "RUN $line" 86 queuepush DetrendClassIDtoStack -replace -key 1:2:4 "RUN $line" 87 88 # the DetrendClassIDtoStack queue contains: 89 # STATE DET_ID ITER TYPE CLASS_ID 90 ## NOTE: the queue has the STATE prepended 91 list word -split $line 92 $DET_ID = $word:1 93 $ITER = $word:2 94 $TYPE = $word:3 95 $CLASS_ID = $word:4 71 96 72 97 # specify choice of remote host: 73 # 'anyhost' specified random remote host74 # if we needed to specify a host explicitly, use a command like75 # one of the following. the -required forces execution on the76 # named host, and blocks the task until the host is available77 # host kiawe78 # host alala -required79 98 host anyhost 80 81 # choose the default recipe appropriate to this type of file82 $recipe = `get.recipe $type`83 99 84 100 # create example job options as a demonstration 85 101 options "$line" 86 87 # we can put the dettool and ppMerge commands here, or wrap them in a single script 88 # $urilist = `dettool -processed -det_id $det_id -iteration $iteration -chip" 89 # $uri_out = ??? 90 # command ppMerge $uri_out $uri $uri ... -recipe PPMERGE $recipe 91 command ppMerge.dettool $uri_out -det_id $det_id -iteration $iteration -recipe PPMERGE $recipe 102 # detrend_stack.pl 1 0 mc bias 103 command detrend_stack.pl $DET_ID $ITER $CLASS_ID $TYPE 92 104 end 93 105 94 106 # success 95 107 task.exit 0 96 # XXX need to parse the options to identify the values below (if not part of cmdline?)97 exec dettool -addstacked -det_id $det_id -iteration $iteration -class_id $class_id -procrecipe $recipe98 108 queuepush DetrendClassIDtoStack -replace -key 1:2:4 "DONE $options:0" 99 109 end … … 101 111 # default exit status 102 112 task.exit default 103 queuepush DetrendClassIDtoStack -replace -key 0"FAIL $options:0"113 queuepush DetrendClassIDtoStack -replace -key 1:2:4 "FAIL $options:0" 104 114 end 105 115 106 116 # operation times out? 107 117 task.exit timeout 108 queuepush DetrendClassIDtoStack -replace -key 0"FAIL $options:0"118 queuepush DetrendClassIDtoStack -replace -key 1:2:4 "FAIL $options:0" 109 119 end 110 120 end
Note:
See TracChangeset
for help on using the changeset viewer.
