Changeset 23480
- Timestamp:
- Mar 20, 2009, 6:08:06 PM (17 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 1 added
- 5 edited
-
Makefile.am (modified) (3 diffs)
-
detrend.cleanup.pro (added)
-
detrend.norm.pro (modified) (7 diffs)
-
detrend.process.pro (modified) (6 diffs)
-
detrend.resid.pro (modified) (6 diffs)
-
detrend.stack.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/Makefile.am
r23248 r23480 1 1 task_files = \ 2 detrend.mkruns.pro \3 2 detrend.norm.pro \ 4 3 detrend.process.pro \ … … 7 6 detrend.stack.pro \ 8 7 detrend.correct.pro \ 8 detrend.cleanup.pro \ 9 9 flatcorr.pro \ 10 10 automate.pro \ … … 36 36 simtest.flatcorr.config \ 37 37 simtest.flatcorr.auto \ 38 simtest.ctemask.config \ 39 simtest.ctemask.auto \ 38 40 simtest.stack.config \ 39 41 simtest.stack.auto -
trunk/ippTasks/detrend.norm.pro
r23230 r23480 9 9 book init detPendingNormImfile 10 10 book init detPendingNormExp 11 12 book init detCleanupNormStatImfile13 book init detCleanupNormImfile14 book init detCleanupNormExp15 11 16 12 macro detnorm.reset … … 18 14 book init detPendingNormImfile 19 15 book init detPendingNormExp 20 21 book init detCleanupNormStatImfile22 book init detCleanupNormImfile23 book init detCleanupNormExp24 16 end 25 17 … … 28 20 book listbook detPendingNormImfile 29 21 book listbook detPendingNormExp 30 31 book listbook detCleanupNormStatImfile32 book listbook detCleanupNormImfile33 book listbook detCleanupNormExp34 22 end 35 23 … … 53 41 active true 54 42 end 55 56 task detrend.cleanup.norm.load57 active true58 end59 task detrend.cleanup.norm.run60 active true61 end62 task detrend.cleanup.normexp.load63 active true64 end65 task detrend.cleanup.normexp.run66 active true67 end68 task detrend.cleanup.normstat.load69 active true70 end71 task detrend.cleanup.normstat.run72 active true73 end74 43 end 75 44 … … 91 60 end 92 61 task detrend.normstat.run 93 active false94 end95 task detrend.cleanup.norm.load96 active false97 end98 task detrend.cleanup.norm.run99 active false100 end101 task detrend.cleanup.normexp.load102 active false103 end104 task detrend.cleanup.normexp.run105 active false106 end107 task detrend.cleanup.normstat.load108 active false109 end110 task detrend.cleanup.normstat.run111 62 active false 112 63 end … … 117 68 $detPendingNormImfile_DB = 0 118 69 $detPendingNormExp_DB = 0 119 120 $detCleanupNormStatImfile_DB = 0121 $detCleanupNormImfile_DB = 0122 $detCleanupNormExp_DB = 0123 70 124 71 # select images ready for copy … … 493 440 end 494 441 end 495 496 ########## cleanup normstat ###########497 task detrend.cleanup.normstat.load498 host local499 500 periods -poll $LOADPOLL501 periods -exec $LOADEXEC502 periods -timeout 30503 npending 1504 active true505 506 stdout NULL507 stderr $LOGDIR/detrend.cleanup.normstat.log508 509 task.exec510 $run = dettool -pendingcleanup_normalizedstat511 if ($DB:n == 0)512 option DEFAULT513 else514 # save the DB name for the exit tasks515 option $DB:$detCleanupNormStatImfile_DB516 $run = $run -dbname $DB:$detCleanupNormStatImfile_DB517 $detCleanupNormStatImfile_DB ++518 if ($detCleanupNormStatImfile_DB >= $DB:n) set detCleanupNormStatImfile_DB = 0519 end520 add_poll_args run521 command $run522 end523 524 # success525 task.exit 0526 # convert 'stdout' to book format527 ipptool2book stdout detCleanupNormStatImfile -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT528 if ($VERBOSE > 2)529 book listbook detCleanupNormStatImfile530 end531 532 # delete existing entries in the appropriate pantaskStates533 process_cleanup detCleanupNormStatImfile534 end535 536 # locked list537 task.exit default538 showcommand failure539 end540 541 task.exit crash542 showcommand crash543 end544 545 # operation times out?546 task.exit timeout547 showcommand timeout548 end549 end550 551 # run the ipp_cleanup.pl script on pending images552 task detrend.cleanup.normstat.run553 periods -poll $RUNPOLL554 periods -exec $RUNEXEC555 periods -timeout 60556 active true557 558 task.exec559 book npages detCleanupNormStatImfile -var N560 if ($N == 0) break561 if ($NETWORK == 0) break562 563 # look for new images in detCleanupNormStatImfile (pantaskState == INIT)564 book getpage detCleanupNormStatImfile 0 -var pageName -key pantaskState INIT565 if ("$pageName" == "NULL") break566 567 book setword detCleanupNormStatImfile $pageName pantaskState RUN568 book getword detCleanupNormStatImfile $pageName det_id -var DET_ID569 book getword detCleanupNormStatImfile $pageName iteration -var ITERATION570 book getword detCleanupNormStatImfile $pageName camera -var CAMERA571 book getword detCleanupNormStatImfile $pageName state -var CLEANUP_MODE572 book getword detCleanupNormStatImfile $pageName dbname -var DBNAME573 574 # specify choice of local or remote host based on camera and chip (class_id)575 set.host.for.camera $CAMERA FPA576 577 stdout $LOGDIR/detrend.cleanup.normstat.log578 stderr $LOGDIR/detrend.cleanup.normstat.log579 580 # XXX is everything listed here needed?581 $run = ipp_cleanup.pl --stage detrend.normstat.imfile --stage_id $DET_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE582 add_standard_args run583 584 # save the pageName for future reference below585 options $pageName586 587 # create the command line588 if ($VERBOSE > 1)589 echo command $run590 end591 command $run592 end593 594 # default exit status595 task.exit default596 process_exit detCleanupNormStatImfile $options:0 $JOB_STATUS597 end598 599 task.exit crash600 showcommand crash601 book setword detCleanupNormStatImfile $options:0 pantaskState CRASH602 end603 604 # operation timed out?605 task.exit timeout606 showcommand timeout607 book setword detCleanupNormStatImfile $options:0 pantaskState TIMEOUT608 end609 end610 611 ########## cleanup norm (normalized.imfile) ###########612 task detrend.cleanup.norm.load613 host local614 615 periods -poll $LOADPOLL616 periods -exec $LOADEXEC617 periods -timeout 30618 npending 1619 active true620 621 stdout NULL622 stderr $LOGDIR/detrend.cleanup.norm.log623 624 task.exec625 $run = dettool -pendingcleanup_normalizedimfile626 if ($DB:n == 0)627 option DEFAULT628 else629 # save the DB name for the exit tasks630 option $DB:$detCleanupNormImfile_DB631 $run = $run -dbname $DB:$detCleanupNormImfile_DB632 $detCleanupNormImfile_DB ++633 if ($detCleanupNormImfile_DB >= $DB:n) set detCleanupNormImfile_DB = 0634 end635 add_poll_args run636 command $run637 end638 639 # success640 task.exit 0641 # convert 'stdout' to book format642 ipptool2book stdout detCleanupNormImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT643 if ($VERBOSE > 2)644 book listbook detCleanupNormImfile645 end646 647 # delete existing entries in the appropriate pantaskStates648 process_cleanup detCleanupNormImfile649 end650 651 # locked list652 task.exit default653 showcommand failure654 end655 656 task.exit crash657 showcommand crash658 end659 660 # operation times out?661 task.exit timeout662 showcommand timeout663 end664 end665 666 # run the ipp_cleanup.pl script on pending images667 task detrend.cleanup.norm.run668 periods -poll $RUNPOLL669 periods -exec $RUNEXEC670 periods -timeout 60671 active true672 673 task.exec674 book npages detCleanupNormImfile -var N675 if ($N == 0) break676 if ($NETWORK == 0) break677 678 # look for new images in detCleanupNormImfile (pantaskState == INIT)679 book getpage detCleanupNormImfile 0 -var pageName -key pantaskState INIT680 if ("$pageName" == "NULL") break681 682 book setword detCleanupNormImfile $pageName pantaskState RUN683 book getword detCleanupNormImfile $pageName det_id -var DET_ID684 book getword detCleanupNormImfile $pageName iteration -var ITERATION685 book getword detCleanupNormImfile $pageName class_id -var CLASS_ID686 book getword detCleanupNormImfile $pageName camera -var CAMERA687 book getword detCleanupNormImfile $pageName state -var CLEANUP_MODE688 book getword detCleanupNormImfile $pageName dbname -var DBNAME689 690 # specify choice of local or remote host based on camera and chip (class_id)691 set.host.for.camera $CAMERA FPA692 693 stdout $LOGDIR/detrend.cleanup.norm.log694 stderr $LOGDIR/detrend.cleanup.norm.log695 696 # XXX is everything listed here needed?697 $run = ipp_cleanup.pl --stage detrend.norm.imfile --stage_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE698 add_standard_args run699 700 # save the pageName for future reference below701 options $pageName702 703 # create the command line704 if ($VERBOSE > 1)705 echo command $run706 end707 command $run708 end709 710 # default exit status711 task.exit default712 process_exit detCleanupNormImfile $options:0 $JOB_STATUS713 end714 715 task.exit crash716 showcommand crash717 book setword detCleanupNormImfile $options:0 pantaskState CRASH718 end719 720 # operation timed out?721 task.exit timeout722 showcommand timeout723 book setword detCleanupNormImfile $options:0 pantaskState TIMEOUT724 end725 end726 727 ########## cleanup normexp ###########728 task detrend.cleanup.normexp.load729 host local730 731 periods -poll $LOADPOLL732 periods -exec $LOADEXEC733 periods -timeout 30734 npending 1735 active true736 737 stdout NULL738 stderr $LOGDIR/detrend.normexp.cleanup.log739 740 task.exec741 $run = dettool -pendingcleanup_normalizedexp742 if ($DB:n == 0)743 option DEFAULT744 else745 # save the DB name for the exit tasks746 option $DB:$detCleanupNormExp_DB747 $run = $run -dbname $DB:$detCleanupNormExp_DB748 $detCleanupNormExp_DB ++749 if ($detCleanupNormExp_DB >= $DB:n) set detCleanupNormExp_DB = 0750 end751 add_poll_args run752 command $run753 end754 755 # success756 task.exit 0757 # convert 'stdout' to book format758 ipptool2book stdout detCleanupNormExp -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT759 if ($VERBOSE > 2)760 book listbook detCleanupNormExp761 end762 763 # delete existing entries in the appropriate pantaskStates764 process_cleanup detCleanupNormExp765 end766 767 # locked list768 task.exit default769 showcommand failure770 end771 772 task.exit crash773 showcommand crash774 end775 776 # operation times out?777 task.exit timeout778 showcommand timeout779 end780 end781 782 # run the ipp_cleanup.pl script on pending images783 task detrend.cleanup.normexp.run784 periods -poll $RUNPOLL785 periods -exec $RUNEXEC786 periods -timeout 60787 active true788 789 task.exec790 book npages detCleanupNormExp -var N791 if ($N == 0) break792 if ($NETWORK == 0) break793 794 # look for new images in detCleanupNormExp (pantaskState == INIT)795 book getpage detCleanupNormExp 0 -var pageName -key pantaskState INIT796 if ("$pageName" == "NULL") break797 798 book setword detCleanupNormExp $pageName pantaskState RUN799 book getword detCleanupNormExp $pageName det_id -var DET_ID800 book getword detCleanupNormExp $pageName iteration -var ITERATION801 book getword detCleanupNormExp $pageName camera -var CAMERA802 book getword detCleanupNormExp $pageName state -var CLEANUP_MODE803 book getword detCleanupNormExp $pageName dbname -var DBNAME804 805 # specify choice of local or remote host based on camera and chip (class_id)806 set.host.for.camera $CAMERA FPA807 808 stdout $LOGDIR/detrend.cleanup.normexp.log809 stderr $LOGDIR/detrend.cleanup.normexp.log810 811 # XXX is everything listed here needed?812 $run = ipp_cleanup.pl --stage detrend.norm.exp --stage_id $DET_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE813 add_standard_args run814 815 # save the pageName for future reference below816 options $pageName817 818 # create the command line819 if ($VERBOSE > 1)820 echo command $run821 end822 command $run823 end824 825 # default exit status826 task.exit default827 process_exit detCleanupNormExp $options:0 $JOB_STATUS828 end829 830 task.exit crash831 showcommand crash832 book setword detCleanupNormExp $options:0 pantaskState CRASH833 end834 835 # operation timed out?836 task.exit timeout837 showcommand timeout838 book setword detCleanupNormExp $options:0 pantaskState TIMEOUT839 end840 end841 -
trunk/ippTasks/detrend.process.pro
r23230 r23480 8 8 book init detPendingProcessedImfile 9 9 book init detPendingProcessedExp 10 book init detCleanupProcessedImfile11 book init detCleanupProcessedExp12 10 13 11 macro detproc.reset 14 12 book init detPendingProcessedImfile 15 13 book init detPendingProcessedExp 16 book init detCleanupProcessedImfile17 book init detCleanupProcessedExp18 14 end 19 15 … … 23 19 echo detPendingProcessedExp 24 20 book listbook detPendingProcessedExp 25 echo detCleanupProcessedImfile26 book listbook detCleanupProcessedImfile27 echo detCleanupProcessedExp28 book listbook detCleanupProcessedExp29 21 end 30 22 … … 42 34 active true 43 35 end 44 task detrend.cleanup.process.load45 active true46 end47 task detrend.cleanup.process.run48 active true49 end50 task detrend.cleanup.processexp.load51 active true52 end53 task detrend.cleanup.processexp.run54 active true55 end56 36 end 57 37 … … 69 49 active false 70 50 end 71 task detrend.cleanup.process.load72 active false73 end74 task detrend.cleanup.process.run75 active false76 end77 task detrend.cleanup.processexp.load78 active false79 end80 task detrend.cleanup.processexp.run81 active false82 end83 51 end 84 52 … … 87 55 $detPendingProcessedImfile_DB = 0 88 56 $detPendingProcessedExp_DB = 0 89 $detCleanupProcessedImfile_DB = 090 $detCleanupProcessedExp_DB = 091 57 92 58 # select images ready for copy … … 347 313 end 348 314 end 349 350 ######## cleanup process imfile ########351 task detrend.cleanup.process.load352 host local353 354 periods -poll $LOADPOLL355 periods -exec $LOADEXEC356 periods -timeout 30357 npending 1358 active true359 360 stdout NULL361 stderr $LOGDIR/detrend.cleanup.process.imfile.log362 363 task.exec364 $run = dettool -pendingcleanup_processedimfile365 if ($DB:n == 0)366 option DEFAULT367 else368 # save the DB name for the exit tasks369 option $DB:$detCleanupProcessedImfile_DB370 $run = $run -dbname $DB:$detCleanupProcessedImfile_DB371 $detCleanupProcessedImfile_DB ++372 if ($detCleanupProcessedImfile_DB >= $DB:n) set detCleanupProcessedImfile_DB = 0373 end374 add_poll_args run375 command $run376 end377 378 # success379 task.exit 0380 # convert 'stdout' to book format381 ipptool2book stdout detCleanupProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT382 if ($VERBOSE > 2)383 book listbook detCleanupProcessedImfile384 end385 386 # delete existing entries in the appropriate pantaskStates387 process_cleanup detCleanupProcessedImfile388 end389 390 # locked list391 task.exit default392 showcommand failure393 end394 395 task.exit crash396 showcommand crash397 end398 399 # operation times out?400 task.exit timeout401 showcommand timeout402 end403 end404 405 # run the ipp_cleanup.pl script on pending images406 task detrend.cleanup.process.run407 periods -poll $RUNPOLL408 periods -exec $RUNEXEC409 periods -timeout 60410 active true411 412 task.exec413 book npages detCleanupProcessedImfile -var N414 if ($N == 0) break415 if ($NETWORK == 0) break416 417 # look for new images in detCleanupProcessedImfile (pantaskState == INIT)418 book getpage detCleanupProcessedImfile 0 -var pageName -key pantaskState INIT419 if ("$pageName" == "NULL") break420 421 book setword detCleanupProcessedImfile $pageName pantaskState RUN422 book getword detCleanupProcessedImfile $pageName det_id -var DET_ID423 book getword detCleanupProcessedImfile $pageName exp_id -var EXP_ID424 book getword detCleanupProcessedImfile $pageName class_id -var CLASS_ID425 book getword detCleanupProcessedImfile $pageName camera -var CAMERA426 book getword detCleanupProcessedImfile $pageName state -var CLEANUP_MODE427 book getword detCleanupProcessedImfile $pageName dbname -var DBNAME428 429 # specify choice of local or remote host based on camera and chip (class_id)430 set.host.for.camera $CAMERA FPA431 432 stdout $LOGDIR/detrend.cleanup.process.imfile.log433 stderr $LOGDIR/detrend.cleanup.process.imfile.log434 435 # XXX is everything listed here needed?436 $run = ipp_cleanup.pl --stage detrend.process.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE437 add_standard_args run438 439 # save the pageName for future reference below440 options $pageName441 442 # create the command line443 if ($VERBOSE > 1)444 echo command $run445 end446 command $run447 end448 449 # default exit status450 task.exit default451 process_exit detCleanupProcessedImfile $options:0 $JOB_STATUS452 end453 454 # locked list455 task.exit crash456 showcommand crash457 echo "hostname: $JOB_HOSTNAME"458 book setword detCleanupProcessedImfile $options:0 pantaskState CRASH459 end460 461 # operation timed out?462 task.exit timeout463 showcommand timeout464 book setword detCleanupProcessedImfile $options:0 pantaskState TIMEOUT465 end466 end467 468 469 ######## cleanup process exp ########470 task detrend.cleanup.processexp.load471 host local472 473 periods -poll $LOADPOLL474 periods -exec $LOADEXEC475 periods -timeout 30476 npending 1477 active true478 479 stdout NULL480 stderr $LOGDIR/detrend.cleanup.process.exp.log481 482 task.exec483 $run = dettool -pendingcleanup_processedexp484 if ($DB:n == 0)485 option DEFAULT486 else487 # save the DB name for the exit tasks488 option $DB:$detCleanupProcessedExp_DB489 $run = $run -dbname $DB:$detCleanupProcessedExp_DB490 $detCleanupProcessedExp_DB ++491 if ($detCleanupProcessedExp_DB >= $DB:n) set detCleanupProcessedExp_DB = 0492 end493 add_poll_args run494 command $run495 end496 497 # success498 task.exit 0499 # convert 'stdout' to book format500 ipptool2book stdout detCleanupProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT501 if ($VERBOSE > 2)502 book listbook detCleanupProcessedExp503 end504 505 # delete existing entries in the appropriate pantaskStates506 process_cleanup detCleanupProcessedExp507 end508 509 # locked list510 task.exit default511 showcommand failure512 end513 514 task.exit crash515 showcommand crash516 end517 518 # operation times out?519 task.exit timeout520 showcommand timeout521 end522 end523 524 # run the ipp_cleanup.pl script on pending images525 task detrend.cleanup.processexp.run526 periods -poll $RUNPOLL527 periods -exec $RUNEXEC528 periods -timeout 60529 active true530 531 task.exec532 book npages detCleanupProcessedExp -var N533 if ($N == 0) break534 if ($NETWORK == 0) break535 536 # look for new images in detCleanupProcessedExp (pantaskState == INIT)537 book getpage detCleanupProcessedExp 0 -var pageName -key pantaskState INIT538 if ("$pageName" == "NULL") break539 540 book setword detCleanupProcessedExp $pageName pantaskState RUN541 book getword detCleanupProcessedExp $pageName det_id -var DET_ID542 book getword detCleanupProcessedExp $pageName exp_id -var EXP_ID543 book getword detCleanupProcessedExp $pageName camera -var CAMERA544 book getword detCleanupProcessedExp $pageName state -var CLEANUP_MODE545 book getword detCleanupProcessedExp $pageName dbname -var DBNAME546 547 # specify choice of local or remote host based on camera and chip (class_id)548 set.host.for.camera $CAMERA FPA549 550 stdout $LOGDIR/detrend.cleanup.process.exp.log551 stderr $LOGDIR/detrend.cleanup.process.exp.log552 553 # XXX is everything listed here needed?554 $run = ipp_cleanup.pl --stage detrend.process.exp --stage_id $DET_ID --exp_id $EXP_ID --camera $CAMERA --mode $CLEANUP_MODE555 add_standard_args run556 557 # save the pageName for future reference below558 options $pageName559 560 # create the command line561 if ($VERBOSE > 1)562 echo command $run563 end564 command $run565 end566 567 # default exit status568 task.exit default569 process_exit detCleanupProcessedExp $options:0 $JOB_STATUS570 end571 572 # locked list573 task.exit crash574 showcommand crash575 echo "hostname: $JOB_HOSTNAME"576 book setword detCleanupProcessedExp $options:0 pantaskState CRASH577 end578 579 # operation timed out?580 task.exit timeout581 showcommand timeout582 book setword detCleanupProcessedExp $options:0 pantaskState TIMEOUT583 end584 end -
trunk/ippTasks/detrend.resid.pro
r23342 r23480 8 8 book init detPendingResidImfile 9 9 book init detPendingResidExp 10 book init detCleanupResidImfile11 book init detCleanupResidExp12 10 13 11 macro detresid.reset 14 12 book init detPendingResidImfile 15 13 book init detPendingResidExp 16 book init detCleanupResidImfile17 book init detCleanupResidExp18 14 end 19 15 … … 21 17 book listbook detPendingResidImfile 22 18 book listbook detPendingResidExp 23 book listbook detCleanupResidImfile24 book listbook detCleanupResidExp25 19 end 26 20 … … 38 32 active true 39 33 end 40 task detrend.cleanup.resid.load41 active true42 end43 task detrend.cleanup.resid.run44 active true45 end46 task detrend.cleanup.residexp.load47 active true48 end49 task detrend.cleanup.residexp.run50 active true51 end52 34 end 53 35 … … 65 47 active false 66 48 end 67 task detrend.cleanup.resid.load68 active false69 end70 task detrend.cleanup.resid.run71 active false72 end73 task detrend.cleanup.residexp.load74 active false75 end76 task detrend.cleanup.residexp.run77 active false78 end79 49 end 80 50 … … 82 52 $detPendingResidImfile_DB = 0 83 53 $detPendingResidExp_DB = 0 84 $detCleanupResidImfile_DB = 085 $detCleanupResidExp_DB = 086 54 87 55 # select images ready for copy … … 348 316 end 349 317 end 350 351 ######## cleanup resid imfile ########352 task detrend.cleanup.resid.load353 host local354 355 periods -poll $LOADPOLL356 periods -exec $LOADEXEC357 periods -timeout 30358 npending 1359 active true360 361 stdout NULL362 stderr $LOGDIR/detrend.cleanup.resid.imfile.log363 364 task.exec365 $run = dettool -pendingcleanup_residimfile366 if ($DB:n == 0)367 option DEFAULT368 else369 # save the DB name for the exit tasks370 option $DB:$detCleanupResidImfile_DB371 $run = $run -dbname $DB:$detCleanupResidImfile_DB372 $detCleanupResidImfile_DB ++373 if ($detCleanupResidImfile_DB >= $DB:n) set detCleanupResidImfile_DB = 0374 end375 add_poll_args run376 command $run377 end378 379 # success380 task.exit 0381 # convert 'stdout' to book format382 ipptool2book stdout detCleanupResidImfile -key det_id:iteration:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT383 if ($VERBOSE > 2)384 book listbook detCleanupResidImfile385 end386 387 # delete existing entries in the appropriate pantaskStates388 process_cleanup detCleanupResidImfile389 end390 391 # locked list392 task.exit default393 showcommand failure394 end395 396 task.exit crash397 showcommand crash398 end399 400 # operation times out?401 task.exit timeout402 showcommand timeout403 end404 end405 406 # run the ipp_cleanup.pl script on pending images407 task detrend.cleanup.resid.run408 periods -poll $RUNPOLL409 periods -exec $RUNEXEC410 periods -timeout 60411 active true412 413 task.exec414 book npages detCleanupResidImfile -var N415 if ($N == 0) break416 if ($NETWORK == 0) break417 418 # look for new images in detCleanupResidImfile (pantaskState == INIT)419 book getpage detCleanupResidImfile 0 -var pageName -key pantaskState INIT420 if ("$pageName" == "NULL") break421 422 book setword detCleanupResidImfile $pageName pantaskState RUN423 book getword detCleanupResidImfile $pageName det_id -var DET_ID424 book getword detCleanupResidImfile $pageName exp_id -var EXP_ID425 book getword detCleanupResidImfile $pageName class_id -var CLASS_ID426 book getword detCleanupResidImfile $pageName iteration -var ITERATION427 book getword detCleanupResidImfile $pageName camera -var CAMERA428 book getword detCleanupResidImfile $pageName state -var CLEANUP_MODE429 book getword detCleanupResidImfile $pageName dbname -var DBNAME430 431 # specify choice of local or remote host based on camera and chip (class_id)432 set.host.for.camera $CAMERA FPA433 434 stdout $LOGDIR/detrend.cleanup.resid.imfile.log435 stderr $LOGDIR/detrend.cleanup.resid.imfile.log436 437 # XXX is everything listed here needed?438 $run = ipp_cleanup.pl --stage detrend.resid.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE439 add_standard_args run440 441 # save the pageName for future reference below442 options $pageName443 444 # create the command line445 if ($VERBOSE > 1)446 echo command $run447 end448 command $run449 end450 451 # default exit status452 task.exit default453 process_exit detCleanupResidImfile $options:0 $JOB_STATUS454 end455 456 # locked list457 task.exit crash458 showcommand crash459 echo "hostname: $JOB_HOSTNAME"460 book setword detCleanupResidImfile $options:0 pantaskState CRASH461 end462 463 # operation timed out?464 task.exit timeout465 showcommand timeout466 book setword detCleanupResidImfile $options:0 pantaskState TIMEOUT467 end468 end469 470 471 ######## cleanup resid exp ########472 task detrend.cleanup.residexp.load473 host local474 475 periods -poll $LOADPOLL476 periods -exec $LOADEXEC477 periods -timeout 30478 npending 1479 active true480 481 stdout NULL482 stderr $LOGDIR/detrend.cleanup.resid.exp.log483 484 task.exec485 $run = dettool -pendingcleanup_residexp486 if ($DB:n == 0)487 option DEFAULT488 else489 # save the DB name for the exit tasks490 option $DB:$detCleanupResidExp_DB491 $run = $run -dbname $DB:$detCleanupResidExp_DB492 $detCleanupResidExp_DB ++493 if ($detCleanupResidExp_DB >= $DB:n) set detCleanupResidExp_DB = 0494 end495 add_poll_args run496 command $run497 end498 499 # success500 task.exit 0501 # convert 'stdout' to book format502 ipptool2book stdout detCleanupResidExp -key det_id:iteration:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT503 if ($VERBOSE > 2)504 book listbook detCleanupResidExp505 end506 507 # delete existing entries in the appropriate pantaskStates508 process_cleanup detCleanupResidExp509 end510 511 # locked list512 task.exit default513 showcommand failure514 end515 516 task.exit crash517 showcommand crash518 end519 520 # operation times out?521 task.exit timeout522 showcommand timeout523 end524 end525 526 # run the ipp_cleanup.pl script on pending images527 task detrend.cleanup.residexp.run528 periods -poll $RUNPOLL529 periods -exec $RUNEXEC530 periods -timeout 60531 active true532 533 task.exec534 book npages detCleanupResidExp -var N535 if ($N == 0) break536 if ($NETWORK == 0) break537 538 # look for new images in detCleanupResidExp (pantaskState == INIT)539 book getpage detCleanupResidExp 0 -var pageName -key pantaskState INIT540 if ("$pageName" == "NULL") break541 542 book setword detCleanupResidExp $pageName pantaskState RUN543 book getword detCleanupResidExp $pageName det_id -var DET_ID544 book getword detCleanupResidExp $pageName exp_id -var EXP_ID545 book getword detCleanupResidExp $pageName iteration -var ITERATION546 book getword detCleanupResidExp $pageName camera -var CAMERA547 book getword detCleanupResidExp $pageName state -var CLEANUP_MODE548 book getword detCleanupResidExp $pageName dbname -var DBNAME549 550 # specify choice of local or remote host based on camera and chip (class_id)551 set.host.for.camera $CAMERA FPA552 553 stdout $LOGDIR/detrend.cleanup.resid.exp.log554 stderr $LOGDIR/detrend.cleanup.resid.exp.log555 556 # XXX is everything listed here needed?557 $run = ipp_cleanup.pl --stage detrend.resid.exp --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE558 add_standard_args run559 560 # save the pageName for future reference below561 options $pageName562 563 # create the command line564 if ($VERBOSE > 1)565 echo command $run566 end567 command $run568 end569 570 # default exit status571 task.exit default572 process_exit detCleanupResidExp $options:0 $JOB_STATUS573 end574 575 # locked list576 task.exit crash577 showcommand crash578 echo "hostname: $JOB_HOSTNAME"579 book setword detCleanupResidExp $options:0 pantaskState CRASH580 end581 582 # operation timed out?583 task.exit timeout584 showcommand timeout585 book setword detCleanupResidExp $options:0 pantaskState TIMEOUT586 end587 end -
trunk/ippTasks/detrend.stack.pro
r23230 r23480 7 7 8 8 book init detPendingStackedImfile 9 book init detCleanupStackedImfile10 9 11 10 macro detstack.reset 12 11 book init detPendingStackedImfile 13 book init detCleanupStackedImfile14 12 end 15 13 … … 17 15 echo detPendingStackedImfile 18 16 book listbook detPendingStackedImfile 19 echo detCleanupStackedImfile20 book listbook detCleanupStackedImfile21 17 end 22 18 … … 26 22 end 27 23 task detrend.stack.run 28 active true29 end30 task detrend.cleanup.stack.load31 active true32 end33 task detrend.cleanup.stack.run34 24 active true 35 25 end … … 43 33 active false 44 34 end 45 task detrend.cleanup.stack.load46 active false47 end48 task detrend.cleanup.stack.run49 active false50 end51 35 end 52 36 53 37 # this variable will cycle through the known database names 54 38 $detPendingStackedImfile_DB = 0 55 $detCleanupStackedImfile_DB = 056 39 57 40 # select images ready for detrend_stack.pl … … 182 165 end 183 166 end 184 185 ########## cleanup stack ###########186 task detrend.cleanup.stack.load187 host local188 189 periods -poll $LOADPOLL190 periods -exec $LOADEXEC191 periods -timeout 30192 npending 1193 active true194 195 stdout NULL196 stderr $LOGDIR/detrend.cleanup.stack.log197 198 task.exec199 $run = dettool -pendingcleanup_stacked200 if ($DB:n == 0)201 option DEFAULT202 else203 # save the DB name for the exit tasks204 option $DB:$detCleanupStackedImfile_DB205 $run = $run -dbname $DB:$detCleanupStackedImfile_DB206 $detCleanupStackedImfile_DB ++207 if ($detCleanupStackedImfile_DB >= $DB:n) set detCleanupStackedImfile_DB = 0208 end209 add_poll_args run210 command $run211 end212 213 # success214 task.exit 0215 # convert 'stdout' to book format216 ipptool2book stdout detCleanupStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT217 if ($VERBOSE > 2)218 book listbook detCleanupStackedImfile219 end220 221 # delete existing entries in the appropriate pantaskStates222 process_cleanup detCleanupStackedImfile223 end224 225 # locked list226 task.exit default227 showcommand failure228 end229 230 task.exit crash231 showcommand crash232 end233 234 # operation times out?235 task.exit timeout236 showcommand timeout237 end238 end239 240 # run the ipp_cleanup.pl script on pending images241 task detrend.cleanup.stack.run242 periods -poll $RUNPOLL243 periods -exec $RUNEXEC244 periods -timeout 60245 active true246 247 task.exec248 book npages detCleanupStackedImfile -var N249 if ($N == 0) break250 if ($NETWORK == 0) break251 252 # look for new images in detCleanupStackedImfile (pantaskState == INIT)253 book getpage detCleanupStackedImfile 0 -var pageName -key pantaskState INIT254 if ("$pageName" == "NULL") break255 256 book setword detCleanupStackedImfile $pageName pantaskState RUN257 book getword detCleanupStackedImfile $pageName det_id -var DET_ID258 book getword detCleanupStackedImfile $pageName iteration -var ITERATION259 book getword detCleanupStackedImfile $pageName class_id -var CLASS_ID260 book getword detCleanupStackedImfile $pageName camera -var CAMERA261 book getword detCleanupStackedImfile $pageName state -var CLEANUP_MODE262 book getword detCleanupStackedImfile $pageName dbname -var DBNAME263 264 # specify choice of local or remote host based on camera and chip (class_id)265 set.host.for.camera $CAMERA FPA266 267 stdout $LOGDIR/detrend.cleanup.stack.log268 stderr $LOGDIR/detrend.cleanup.stack.log269 270 # XXX is everything listed here needed?271 $run = ipp_cleanup.pl --stage detrend.stack.imfile --stage_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE272 add_standard_args run273 274 # save the pageName for future reference below275 options $pageName276 277 # create the command line278 if ($VERBOSE > 1)279 echo command $run280 end281 command $run282 end283 284 # default exit status285 task.exit default286 process_exit detCleanupStackedImfile $options:0 $JOB_STATUS287 end288 289 # locked list290 task.exit crash291 showcommand crash292 echo "hostname: $JOB_HOSTNAME"293 book setword detCleanupStackedImfile $options:0 pantaskState CRASH294 end295 296 # operation timed out?297 task.exit timeout298 showcommand timeout299 book setword detCleanupStackedImfile $options:0 pantaskState TIMEOUT300 end301 end302
Note:
See TracChangeset
for help on using the changeset viewer.
