Changeset 18998
- Timestamp:
- Aug 8, 2008, 5:23:19 PM (18 years ago)
- Location:
- branches/eam_branch_20080806/ippTasks
- Files:
-
- 4 edited
-
detrend.norm.pro (modified) (12 diffs)
-
detrend.process.pro (modified) (10 diffs)
-
detrend.resid.pro (modified) (10 diffs)
-
detrend.stack.pro (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080806/ippTasks/detrend.norm.pro
r18607 r18998 9 9 book init detPendingNormImfile 10 10 book init detPendingNormExp 11 12 book init detCleanupNormStatImfile 13 book init detCleanupNormImfile 14 book init detCleanupNormExp 11 15 12 16 macro detnorm.reset … … 14 18 book init detPendingNormImfile 15 19 book init detPendingNormExp 20 21 book init detCleanupNormStatImfile 22 book init detCleanupNormImfile 23 book init detCleanupNormExp 16 24 end 17 25 … … 20 28 book listbook detPendingNormImfile 21 29 book listbook detPendingNormExp 30 31 book listbook detCleanupNormStatImfile 32 book listbook detCleanupNormImfile 33 book listbook detCleanupNormExp 22 34 end 23 35 … … 41 53 active true 42 54 end 55 56 task detrend.cleanup.norm.load 57 active true 58 end 59 task detrend.cleanup.norm.run 60 active true 61 end 62 task detrend.cleanup.normexp.load 63 active true 64 end 65 task detrend.cleanup.normexp.run 66 active true 67 end 68 task detrend.cleanup.normstat.load 69 active true 70 end 71 task detrend.cleanup.normstat.run 72 active true 73 end 43 74 end 44 75 … … 60 91 end 61 92 task detrend.normstat.run 93 active false 94 end 95 task detrend.cleanup.norm.load 96 active false 97 end 98 task detrend.cleanup.norm.run 99 active false 100 end 101 task detrend.cleanup.normexp.load 102 active false 103 end 104 task detrend.cleanup.normexp.run 105 active false 106 end 107 task detrend.cleanup.normstat.load 108 active false 109 end 110 task detrend.cleanup.normstat.run 62 111 active false 63 112 end … … 68 117 $detPendingNormImfile_DB = 0 69 118 $detPendingNormExp_DB = 0 119 120 $detCleanupNormStatImfile_DB = 0 121 $detCleanupNormImfile_DB = 0 122 $detCleanupNormExp_DB = 0 70 123 71 124 # select images ready for copy … … 81 134 82 135 stdout NULL 83 stderr $LOGDIR/detrend.normstat.lo ad.log136 stderr $LOGDIR/detrend.normstat.log 84 137 85 138 task.exec … … 191 244 192 245 stdout NULL 193 stderr $LOGDIR/detrend.norm.lo ad.log246 stderr $LOGDIR/detrend.norm.log 194 247 195 248 task.exec … … 264 317 sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 265 318 266 stdout $LOGDIR/detrend.norm. run.log267 stderr $LOGDIR/detrend.norm. run.log319 stdout $LOGDIR/detrend.norm.log 320 stderr $LOGDIR/detrend.norm.log 268 321 269 322 $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot --redirect-output --verbose … … 304 357 305 358 stdout NULL 306 stderr $LOGDIR/detrend.normexp.lo ad.log359 stderr $LOGDIR/detrend.normexp.log 307 360 308 361 task.exec … … 374 427 sprintf outroot "%s/%s.%s.%s/%s.%s.normexp.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 375 428 376 stdout $LOGDIR/detrend.norm .run.log377 stderr $LOGDIR/detrend.norm .run.log429 stdout $LOGDIR/detrend.normexp.log 430 stderr $LOGDIR/detrend.normexp.log 378 431 379 432 $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --outroot $outroot … … 401 454 end 402 455 end 456 457 ########## cleanup normstat ########### 458 task detrend.cleanup.normstat.load 459 host local 460 461 periods -poll $LOADPOLL 462 periods -exec $LOADEXEC 463 periods -timeout 30 464 npending 1 465 active true 466 467 stdout NULL 468 stderr $LOGDIR/detrend.cleanup.normstat.log 469 470 task.exec 471 if ($DB:n == 0) 472 option DEFAULT 473 command dettool -pendingcleanup_normalizedstat -limit 20 474 else 475 # save the DB name for the exit tasks 476 option $DB:$detCleanupNormStatImfile_DB 477 command dettool -pendingcleanup_normalizedstat -limit 20 -dbname $DB:$detCleanupNormStatImfile_DB 478 $detCleanupNormStatImfile_DB ++ 479 if ($detCleanupNormStatImfile_DB >= $DB:n) set detCleanupNormStatImfile_DB = 0 480 end 481 end 482 483 # success 484 task.exit 0 485 # convert 'stdout' to book format 486 ipptool2book stdout detCleanupNormStatImfile -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT 487 if ($VERBOSE > 2) 488 book listbook detCleanupNormStatImfile 489 end 490 491 # delete existing entries in the appropriate pantaskStates 492 process_cleanup detCleanupNormStatImfile 493 end 494 495 # locked list 496 task.exit default 497 showcommand failure 498 end 499 500 # operation times out? 501 task.exit timeout 502 showcommand timeout 503 end 504 end 505 506 # run the ipp_cleanup.pl script on pending images 507 task detrend.cleanup.normstat.run 508 periods -poll $RUNPOLL 509 periods -exec $RUNEXEC 510 periods -timeout 60 511 active true 512 513 task.exec 514 book npages detCleanupNormStatImfile -var N 515 if ($N == 0) break 516 if ($NETWORK == 0) break 517 518 # look for new images in detCleanupNormStatImfile (pantaskState == INIT) 519 book getpage detCleanupNormStatImfile 0 -var pageName -key pantaskState INIT 520 if ("$pageName" == "NULL") break 521 522 book setword detCleanupNormStatImfile $pageName pantaskState RUN 523 book getword detCleanupNormStatImfile $pageName det_id -var DET_ID 524 book getword detCleanupNormStatImfile $pageName iteration -var ITERATION 525 book getword detCleanupNormStatImfile $pageName camera -var CAMERA 526 book getword detCleanupNormStatImfile $pageName state -var CLEANUP_MODE 527 book getword detCleanupNormStatImfile $pageName dbname -var DBNAME 528 529 # specify choice of local or remote host based on camera and chip (class_id) 530 set.host.for.camera $CAMERA FPA 531 532 stdout $LOGDIR/detrend.cleanup.normstat.log 533 stderr $LOGDIR/detrend.cleanup.normstat.log 534 535 # XXX is everything listed here needed? 536 $run = ipp_cleanup.pl --stage detrend.normstat.imfile --stage_id $DET_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE 537 add_standard_args run 538 539 # save the pageName for future reference below 540 options $pageName 541 542 # create the command line 543 if ($VERBOSE > 1) 544 echo command $run 545 end 546 command $run 547 end 548 549 # default exit status 550 task.exit default 551 process_exit detCleanupNormStatImfile $options:0 $JOB_STATUS 552 end 553 554 # operation timed out? 555 task.exit timeout 556 showcommand timeout 557 book setword detCleanupNormStatImfile $options:0 pantaskState TIMEOUT 558 end 559 end 560 561 ########## cleanup norm (normalized.imfile) ########### 562 task detrend.cleanup.norm.load 563 host local 564 565 periods -poll $LOADPOLL 566 periods -exec $LOADEXEC 567 periods -timeout 30 568 npending 1 569 active true 570 571 stdout NULL 572 stderr $LOGDIR/detrend.cleanup.norm.log 573 574 task.exec 575 if ($DB:n == 0) 576 option DEFAULT 577 command dettool -pendingcleanup_normalizedimfile -limit 20 578 else 579 # save the DB name for the exit tasks 580 option $DB:$detCleanupNormImfile_DB 581 command dettool -pendingcleanup_normalizedimfile -limit 20 -dbname $DB:$detCleanupNormImfile_DB 582 $detCleanupNormImfile_DB ++ 583 if ($detCleanupNormImfile_DB >= $DB:n) set detCleanupNormImfile_DB = 0 584 end 585 end 586 587 # success 588 task.exit 0 589 # convert 'stdout' to book format 590 ipptool2book stdout detCleanupNormImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 591 if ($VERBOSE > 2) 592 book listbook detCleanupNormImfile 593 end 594 595 # delete existing entries in the appropriate pantaskStates 596 process_cleanup detCleanupNormImfile 597 end 598 599 # locked list 600 task.exit default 601 showcommand failure 602 end 603 604 # operation times out? 605 task.exit timeout 606 showcommand timeout 607 end 608 end 609 610 # run the ipp_cleanup.pl script on pending images 611 task detrend.cleanup.norm.run 612 periods -poll $RUNPOLL 613 periods -exec $RUNEXEC 614 periods -timeout 60 615 active true 616 617 task.exec 618 book npages detCleanupNormImfile -var N 619 if ($N == 0) break 620 if ($NETWORK == 0) break 621 622 # look for new images in detCleanupNormImfile (pantaskState == INIT) 623 book getpage detCleanupNormImfile 0 -var pageName -key pantaskState INIT 624 if ("$pageName" == "NULL") break 625 626 book setword detCleanupNormImfile $pageName pantaskState RUN 627 book getword detCleanupNormImfile $pageName det_id -var DET_ID 628 book getword detCleanupNormImfile $pageName iteration -var ITERATION 629 book getword detCleanupNormImfile $pageName class_id -var CLASS_ID 630 book getword detCleanupNormImfile $pageName camera -var CAMERA 631 book getword detCleanupNormImfile $pageName state -var CLEANUP_MODE 632 book getword detCleanupNormImfile $pageName dbname -var DBNAME 633 634 # specify choice of local or remote host based on camera and chip (class_id) 635 set.host.for.camera $CAMERA FPA 636 637 stdout $LOGDIR/detrend.cleanup.norm.log 638 stderr $LOGDIR/detrend.cleanup.norm.log 639 640 # XXX is everything listed here needed? 641 $run = ipp_cleanup.pl --stage detrend.norm.imfile --stage_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE 642 add_standard_args run 643 644 # save the pageName for future reference below 645 options $pageName 646 647 # create the command line 648 if ($VERBOSE > 1) 649 echo command $run 650 end 651 command $run 652 end 653 654 # default exit status 655 task.exit default 656 process_exit detCleanupNormImfile $options:0 $JOB_STATUS 657 end 658 659 # operation timed out? 660 task.exit timeout 661 showcommand timeout 662 book setword detCleanupNormImfile $options:0 pantaskState TIMEOUT 663 end 664 end 665 666 ########## cleanup normexp ########### 667 task detrend.cleanup.normexp.load 668 host local 669 670 periods -poll $LOADPOLL 671 periods -exec $LOADEXEC 672 periods -timeout 30 673 npending 1 674 active true 675 676 stdout NULL 677 stderr $LOGDIR/detrend.normexp.cleanup.log 678 679 task.exec 680 if ($DB:n == 0) 681 option DEFAULT 682 command dettool -pendingcleanup_normalizedexp -limit 20 683 else 684 # save the DB name for the exit tasks 685 option $DB:$detCleanupNormExp_DB 686 command dettool -pendingcleanup_normalizedexp -limit 20 -dbname $DB:$detCleanupNormExp_DB 687 $detCleanupNormExp_DB ++ 688 if ($detCleanupNormExp_DB >= $DB:n) set detCleanupNormExp_DB = 0 689 end 690 end 691 692 # success 693 task.exit 0 694 # convert 'stdout' to book format 695 ipptool2book stdout detCleanupNormExp -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT 696 if ($VERBOSE > 2) 697 book listbook detCleanupNormExp 698 end 699 700 # delete existing entries in the appropriate pantaskStates 701 process_cleanup detCleanupNormExp 702 end 703 704 # locked list 705 task.exit default 706 showcommand failure 707 end 708 709 # operation times out? 710 task.exit timeout 711 showcommand timeout 712 end 713 end 714 715 # run the ipp_cleanup.pl script on pending images 716 task detrend.cleanup.normexp.run 717 periods -poll $RUNPOLL 718 periods -exec $RUNEXEC 719 periods -timeout 60 720 active true 721 722 task.exec 723 book npages detCleanupNormExp -var N 724 if ($N == 0) break 725 if ($NETWORK == 0) break 726 727 # look for new images in detCleanupNormExp (pantaskState == INIT) 728 book getpage detCleanupNormExp 0 -var pageName -key pantaskState INIT 729 if ("$pageName" == "NULL") break 730 731 book setword detCleanupNormExp $pageName pantaskState RUN 732 book getword detCleanupNormExp $pageName det_id -var DET_ID 733 book getword detCleanupNormExp $pageName iteration -var ITERATION 734 book getword detCleanupNormExp $pageName camera -var CAMERA 735 book getword detCleanupNormExp $pageName state -var CLEANUP_MODE 736 book getword detCleanupNormExp $pageName dbname -var DBNAME 737 738 # specify choice of local or remote host based on camera and chip (class_id) 739 set.host.for.camera $CAMERA FPA 740 741 stdout $LOGDIR/detrend.cleanup.normexp.log 742 stderr $LOGDIR/detrend.cleanup.normexp.log 743 744 # XXX is everything listed here needed? 745 $run = ipp_cleanup.pl --stage detrend.norm.exp --stage_id $DET_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE 746 add_standard_args run 747 748 # save the pageName for future reference below 749 options $pageName 750 751 # create the command line 752 if ($VERBOSE > 1) 753 echo command $run 754 end 755 command $run 756 end 757 758 # default exit status 759 task.exit default 760 process_exit detCleanupNormExp $options:0 $JOB_STATUS 761 end 762 763 # operation timed out? 764 task.exit timeout 765 showcommand timeout 766 book setword detCleanupNormExp $options:0 pantaskState TIMEOUT 767 end 768 end 769 -
branches/eam_branch_20080806/ippTasks/detrend.process.pro
r18935 r18998 8 8 book init detPendingProcessedImfile 9 9 book init detPendingProcessedExp 10 book init detCleanupProcessedImfile 11 book init detCleanupProcessedExp 10 12 11 13 macro detproc.reset 12 14 book init detPendingProcessedImfile 13 15 book init detPendingProcessedExp 16 book init detCleanupProcessedImfile 17 book init detCleanupProcessedExp 14 18 end 15 19 … … 19 23 echo detPendingProcessedExp 20 24 book listbook detPendingProcessedExp 25 echo detCleanupProcessedImfile 26 book listbook detCleanupProcessedImfile 27 echo detCleanupProcessedExp 28 book listbook detCleanupProcessedExp 21 29 end 22 30 … … 34 42 active true 35 43 end 44 task detrend.cleanup.process.load 45 active true 46 end 47 task detrend.cleanup.process.run 48 active true 49 end 50 task detrend.cleanup.processexp.load 51 active true 52 end 53 task detrend.cleanup.processexp.run 54 active true 55 end 36 56 end 37 57 … … 47 67 end 48 68 task detrend.processexp.run 69 active false 70 end 71 task detrend.cleanup.process.load 72 active false 73 end 74 task detrend.cleanup.process.run 75 active false 76 end 77 task detrend.cleanup.processexp.load 78 active false 79 end 80 task detrend.cleanup.processexp.run 49 81 active false 50 82 end … … 55 87 $detPendingProcessedImfile_DB = 0 56 88 $detPendingProcessedExp_DB = 0 89 $detCleanupProcessedImfile_DB = 0 90 $detCleanupProcessedExp_DB = 0 57 91 58 92 # select images ready for copy … … 68 102 69 103 stdout NULL 70 stderr $LOGDIR/det proc.imfile.load.log104 stderr $LOGDIR/detrend.process.imfile.log 71 105 72 106 task.exec … … 142 176 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 143 177 144 stdout $LOGDIR/det proc.imfile.run.log145 stderr $LOGDIR/det proc.imfile.run.log178 stdout $LOGDIR/detrend.process.imfile.log 179 stderr $LOGDIR/detrend.process.imfile.log 146 180 147 181 $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot --redirect-output … … 185 219 186 220 stdout NULL 187 stderr $LOGDIR/det proc.exp.load.log221 stderr $LOGDIR/detrend.process.exp.log 188 222 189 223 task.exec … … 257 291 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 258 292 259 stdout $LOGDIR/det proc.exp.run.log260 stderr $LOGDIR/det proc.exp.run.log293 stdout $LOGDIR/detrend.process.exp.log 294 stderr $LOGDIR/detrend.process.exp.log 261 295 262 296 $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose … … 287 321 end 288 322 end 323 324 ######## cleanup process imfile ######## 325 task detrend.cleanup.process.load 326 host local 327 328 periods -poll $LOADPOLL 329 periods -exec $LOADEXEC 330 periods -timeout 30 331 npending 1 332 active true 333 334 stdout NULL 335 stderr $LOGDIR/detrend.cleanup.process.imfile.log 336 337 task.exec 338 if ($DB:n == 0) 339 option DEFAULT 340 command dettool -pendingcleanup_processedimfile -limit 20 341 else 342 # save the DB name for the exit tasks 343 option $DB:$detCleanupProcessedImfile_DB 344 command dettool -pendingcleanup_processedimfile -limit 20 -dbname $DB:$detCleanupProcessedImfile_DB 345 $detCleanupProcessedImfile_DB ++ 346 if ($detCleanupProcessedImfile_DB >= $DB:n) set detCleanupProcessedImfile_DB = 0 347 end 348 end 349 350 # success 351 task.exit 0 352 # convert 'stdout' to book format 353 ipptool2book stdout detCleanupProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 354 if ($VERBOSE > 2) 355 book listbook detCleanupProcessedImfile 356 end 357 358 # delete existing entries in the appropriate pantaskStates 359 process_cleanup detCleanupProcessedImfile 360 end 361 362 # locked list 363 task.exit default 364 showcommand failure 365 end 366 367 # operation times out? 368 task.exit timeout 369 showcommand timeout 370 end 371 end 372 373 # run the ipp_cleanup.pl script on pending images 374 task detrend.cleanup.process.run 375 periods -poll $RUNPOLL 376 periods -exec $RUNEXEC 377 periods -timeout 60 378 active true 379 380 task.exec 381 book npages detCleanupProcessedImfile -var N 382 if ($N == 0) break 383 if ($NETWORK == 0) break 384 385 # look for new images in detCleanupProcessedImfile (pantaskState == INIT) 386 book getpage detCleanupProcessedImfile 0 -var pageName -key pantaskState INIT 387 if ("$pageName" == "NULL") break 388 389 book setword detCleanupProcessedImfile $pageName pantaskState RUN 390 book getword detCleanupProcessedImfile $pageName det_id -var DET_ID 391 book getword detCleanupProcessedImfile $pageName exp_id -var EXP_ID 392 book getword detCleanupProcessedImfile $pageName class_id -var CLASS_ID 393 book getword detCleanupProcessedImfile $pageName camera -var CAMERA 394 book getword detCleanupProcessedImfile $pageName state -var CLEANUP_MODE 395 book getword detCleanupProcessedImfile $pageName dbname -var DBNAME 396 397 # specify choice of local or remote host based on camera and chip (class_id) 398 set.host.for.camera $CAMERA FPA 399 400 stdout $LOGDIR/detrend.cleanup.process.imfile.log 401 stderr $LOGDIR/detrend.cleanup.process.imfile.log 402 403 # XXX is everything listed here needed? 404 $run = ipp_cleanup.pl --stage detrend.process.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE 405 add_standard_args run 406 407 # save the pageName for future reference below 408 options $pageName 409 410 # create the command line 411 if ($VERBOSE > 1) 412 echo command $run 413 end 414 command $run 415 end 416 417 # default exit status 418 task.exit default 419 process_exit detCleanupProcessedImfile $options:0 $JOB_STATUS 420 end 421 422 # operation timed out? 423 task.exit timeout 424 showcommand timeout 425 book setword detCleanupProcessedImfile $options:0 pantaskState TIMEOUT 426 end 427 end 428 429 430 ######## cleanup process exp ######## 431 task detrend.cleanup.processexp.load 432 host local 433 434 periods -poll $LOADPOLL 435 periods -exec $LOADEXEC 436 periods -timeout 30 437 npending 1 438 active true 439 440 stdout NULL 441 stderr $LOGDIR/detrend.cleanup.process.exp.log 442 443 task.exec 444 if ($DB:n == 0) 445 option DEFAULT 446 command dettool -pendingcleanup_processedexp -limit 20 447 else 448 # save the DB name for the exit tasks 449 option $DB:$detCleanupProcessedExp_DB 450 command dettool -pendingcleanup_processedexp -limit 20 -dbname $DB:$detCleanupProcessedExp_DB 451 $detCleanupProcessedExp_DB ++ 452 if ($detCleanupProcessedExp_DB >= $DB:n) set detCleanupProcessedExp_DB = 0 453 end 454 end 455 456 # success 457 task.exit 0 458 # convert 'stdout' to book format 459 ipptool2book stdout detCleanupProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 460 if ($VERBOSE > 2) 461 book listbook detCleanupProcessedExp 462 end 463 464 # delete existing entries in the appropriate pantaskStates 465 process_cleanup detCleanupProcessedExp 466 end 467 468 # locked list 469 task.exit default 470 showcommand failure 471 end 472 473 # operation times out? 474 task.exit timeout 475 showcommand timeout 476 end 477 end 478 479 # run the ipp_cleanup.pl script on pending images 480 task detrend.cleanup.processexp.run 481 periods -poll $RUNPOLL 482 periods -exec $RUNEXEC 483 periods -timeout 60 484 active true 485 486 task.exec 487 book npages detCleanupProcessedExp -var N 488 if ($N == 0) break 489 if ($NETWORK == 0) break 490 491 # look for new images in detCleanupProcessedExp (pantaskState == INIT) 492 book getpage detCleanupProcessedExp 0 -var pageName -key pantaskState INIT 493 if ("$pageName" == "NULL") break 494 495 book setword detCleanupProcessedExp $pageName pantaskState RUN 496 book getword detCleanupProcessedExp $pageName det_id -var DET_ID 497 book getword detCleanupProcessedExp $pageName exp_id -var EXP_ID 498 book getword detCleanupProcessedExp $pageName camera -var CAMERA 499 book getword detCleanupProcessedExp $pageName state -var CLEANUP_MODE 500 book getword detCleanupProcessedExp $pageName dbname -var DBNAME 501 502 # specify choice of local or remote host based on camera and chip (class_id) 503 set.host.for.camera $CAMERA FPA 504 505 stdout $LOGDIR/detrend.cleanup.process.exp.log 506 stderr $LOGDIR/detrend.cleanup.process.exp.log 507 508 # XXX is everything listed here needed? 509 $run = ipp_cleanup.pl --stage detrend.process.exp --stage_id $DET_ID --exp_id $EXP_ID --camera $CAMERA --mode $CLEANUP_MODE 510 add_standard_args run 511 512 # save the pageName for future reference below 513 options $pageName 514 515 # create the command line 516 if ($VERBOSE > 1) 517 echo command $run 518 end 519 command $run 520 end 521 522 # default exit status 523 task.exit default 524 process_exit detCleanupProcessedExp $options:0 $JOB_STATUS 525 end 526 527 # operation timed out? 528 task.exit timeout 529 showcommand timeout 530 book setword detCleanupProcessedExp $options:0 pantaskState TIMEOUT 531 end 532 end -
branches/eam_branch_20080806/ippTasks/detrend.resid.pro
r18606 r18998 8 8 book init detPendingResidImfile 9 9 book init detPendingResidExp 10 book init detCleanupResidImfile 11 book init detCleanupResidExp 10 12 11 13 macro detresid.reset 12 14 book init detPendingResidImfile 13 15 book init detPendingResidExp 16 book init detCleanupResidImfile 17 book init detCleanupResidExp 14 18 end 15 19 … … 17 21 book listbook detPendingResidImfile 18 22 book listbook detPendingResidExp 23 book listbook detCleanupResidImfile 24 book listbook detCleanupResidExp 19 25 end 20 26 … … 32 38 active true 33 39 end 40 task detrend.cleanup.resid.load 41 active true 42 end 43 task detrend.cleanup.resid.run 44 active true 45 end 46 task detrend.cleanup.residexp.load 47 active true 48 end 49 task detrend.cleanup.residexp.run 50 active true 51 end 34 52 end 35 53 … … 45 63 end 46 64 task detrend.residexp.run 65 active false 66 end 67 task detrend.cleanup.resid.load 68 active false 69 end 70 task detrend.cleanup.resid.run 71 active false 72 end 73 task detrend.cleanup.residexp.load 74 active false 75 end 76 task detrend.cleanup.residexp.run 47 77 active false 48 78 end … … 52 82 $detPendingResidImfile_DB = 0 53 83 $detPendingResidExp_DB = 0 84 $detCleanupResidImfile_DB = 0 85 $detCleanupResidExp_DB = 0 54 86 55 87 # select images ready for copy … … 65 97 66 98 stdout NULL 67 stderr $LOGDIR/detre sid.load.log99 stderr $LOGDIR/detrend.resid.imfile.log 68 100 69 101 task.exec … … 142 174 sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION 143 175 144 stdout $LOGDIR/detre sid.run.log145 stderr $LOGDIR/detre sid.run.log176 stdout $LOGDIR/detrend.resid.imfile.log 177 stderr $LOGDIR/detrend.resid.imfile.log 146 178 147 179 $run = detrend_resid_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot --redirect-output --verbose … … 186 218 187 219 stdout NULL 188 stderr $LOGDIR/detre sid.exp.load.log220 stderr $LOGDIR/detrend.resid.exp.log 189 221 190 222 task.exec … … 260 292 sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION 261 293 262 stdout $LOGDIR/detre sid.exp.run.log263 stderr $LOGDIR/detre sid.exp.run.log294 stdout $LOGDIR/detrend.resid.exp.log 295 stderr $LOGDIR/detrend.resid.exp.log 264 296 265 297 $run = detrend_resid_exp.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose … … 288 320 end 289 321 end 322 323 ######## cleanup resid imfile ######## 324 task detrend.cleanup.resid.load 325 host local 326 327 periods -poll $LOADPOLL 328 periods -exec $LOADEXEC 329 periods -timeout 30 330 npending 1 331 active true 332 333 stdout NULL 334 stderr $LOGDIR/detrend.cleanup.resid.imfile.log 335 336 task.exec 337 if ($DB:n == 0) 338 option DEFAULT 339 command dettool -pendingcleanup_residimfile -limit 20 340 else 341 # save the DB name for the exit tasks 342 option $DB:$detCleanupResidImfile_DB 343 command dettool -pendingcleanup_residimfile -limit 20 -dbname $DB:$detCleanupResidImfile_DB 344 $detCleanupResidImfile_DB ++ 345 if ($detCleanupResidImfile_DB >= $DB:n) set detCleanupResidImfile_DB = 0 346 end 347 end 348 349 # success 350 task.exit 0 351 # convert 'stdout' to book format 352 ipptool2book stdout detCleanupResidImfile -key det_id:iteration:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 353 if ($VERBOSE > 2) 354 book listbook detCleanupResidImfile 355 end 356 357 # delete existing entries in the appropriate pantaskStates 358 process_cleanup detCleanupResidImfile 359 end 360 361 # locked list 362 task.exit default 363 showcommand failure 364 end 365 366 # operation times out? 367 task.exit timeout 368 showcommand timeout 369 end 370 end 371 372 # run the ipp_cleanup.pl script on pending images 373 task detrend.cleanup.resid.run 374 periods -poll $RUNPOLL 375 periods -exec $RUNEXEC 376 periods -timeout 60 377 active true 378 379 task.exec 380 book npages detCleanupResidImfile -var N 381 if ($N == 0) break 382 if ($NETWORK == 0) break 383 384 # look for new images in detCleanupResidImfile (pantaskState == INIT) 385 book getpage detCleanupResidImfile 0 -var pageName -key pantaskState INIT 386 if ("$pageName" == "NULL") break 387 388 book setword detCleanupResidImfile $pageName pantaskState RUN 389 book getword detCleanupResidImfile $pageName det_id -var DET_ID 390 book getword detCleanupResidImfile $pageName exp_id -var EXP_ID 391 book getword detCleanupResidImfile $pageName class_id -var CLASS_ID 392 book getword detCleanupResidImfile $pageName iteration -var ITERATION 393 book getword detCleanupResidImfile $pageName camera -var CAMERA 394 book getword detCleanupResidImfile $pageName state -var CLEANUP_MODE 395 book getword detCleanupResidImfile $pageName dbname -var DBNAME 396 397 # specify choice of local or remote host based on camera and chip (class_id) 398 set.host.for.camera $CAMERA FPA 399 400 stdout $LOGDIR/detrend.cleanup.resid.imfile.log 401 stderr $LOGDIR/detrend.cleanup.resid.imfile.log 402 403 # XXX is everything listed here needed? 404 $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_MODE 405 add_standard_args run 406 407 # save the pageName for future reference below 408 options $pageName 409 410 # create the command line 411 if ($VERBOSE > 1) 412 echo command $run 413 end 414 command $run 415 end 416 417 # default exit status 418 task.exit default 419 process_exit detCleanupResidImfile $options:0 $JOB_STATUS 420 end 421 422 # operation timed out? 423 task.exit timeout 424 showcommand timeout 425 book setword detCleanupResidImfile $options:0 pantaskState TIMEOUT 426 end 427 end 428 429 430 ######## cleanup resid exp ######## 431 task detrend.cleanup.residexp.load 432 host local 433 434 periods -poll $LOADPOLL 435 periods -exec $LOADEXEC 436 periods -timeout 30 437 npending 1 438 active true 439 440 stdout NULL 441 stderr $LOGDIR/detrend.cleanup.resid.exp.log 442 443 task.exec 444 if ($DB:n == 0) 445 option DEFAULT 446 command dettool -pendingcleanup_residexp -limit 20 447 else 448 # save the DB name for the exit tasks 449 option $DB:$detCleanupResidExp_DB 450 command dettool -pendingcleanup_residexp -limit 20 -dbname $DB:$detCleanupResidExp_DB 451 $detCleanupResidExp_DB ++ 452 if ($detCleanupResidExp_DB >= $DB:n) set detCleanupResidExp_DB = 0 453 end 454 end 455 456 # success 457 task.exit 0 458 # convert 'stdout' to book format 459 ipptool2book stdout detCleanupResidExp -key det_id:iteration:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 460 if ($VERBOSE > 2) 461 book listbook detCleanupResidExp 462 end 463 464 # delete existing entries in the appropriate pantaskStates 465 process_cleanup detCleanupResidExp 466 end 467 468 # locked list 469 task.exit default 470 showcommand failure 471 end 472 473 # operation times out? 474 task.exit timeout 475 showcommand timeout 476 end 477 end 478 479 # run the ipp_cleanup.pl script on pending images 480 task detrend.cleanup.residexp.run 481 periods -poll $RUNPOLL 482 periods -exec $RUNEXEC 483 periods -timeout 60 484 active true 485 486 task.exec 487 book npages detCleanupResidExp -var N 488 if ($N == 0) break 489 if ($NETWORK == 0) break 490 491 # look for new images in detCleanupResidExp (pantaskState == INIT) 492 book getpage detCleanupResidExp 0 -var pageName -key pantaskState INIT 493 if ("$pageName" == "NULL") break 494 495 book setword detCleanupResidExp $pageName pantaskState RUN 496 book getword detCleanupResidExp $pageName det_id -var DET_ID 497 book getword detCleanupResidExp $pageName exp_id -var EXP_ID 498 book getword detCleanupResidExp $pageName iteration -var ITERATION 499 book getword detCleanupResidExp $pageName camera -var CAMERA 500 book getword detCleanupResidExp $pageName state -var CLEANUP_MODE 501 book getword detCleanupResidExp $pageName dbname -var DBNAME 502 503 # specify choice of local or remote host based on camera and chip (class_id) 504 set.host.for.camera $CAMERA FPA 505 506 stdout $LOGDIR/detrend.cleanup.resid.exp.log 507 stderr $LOGDIR/detrend.cleanup.resid.exp.log 508 509 # XXX is everything listed here needed? 510 $run = ipp_cleanup.pl --stage detrend.resid.exp --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE 511 add_standard_args run 512 513 # save the pageName for future reference below 514 options $pageName 515 516 # create the command line 517 if ($VERBOSE > 1) 518 echo command $run 519 end 520 command $run 521 end 522 523 # default exit status 524 task.exit default 525 process_exit detCleanupResidExp $options:0 $JOB_STATUS 526 end 527 528 # operation timed out? 529 task.exit timeout 530 showcommand timeout 531 book setword detCleanupResidExp $options:0 pantaskState TIMEOUT 532 end 533 end -
branches/eam_branch_20080806/ippTasks/detrend.stack.pro
r18129 r18998 7 7 8 8 book init detPendingStackedImfile 9 book init detCleanupStackedImfile 9 10 10 11 macro detstack.reset 11 12 book init detPendingStackedImfile 13 book init detCleanupStackedImfile 12 14 end 13 15 … … 15 17 echo detPendingStackedImfile 16 18 book listbook detPendingStackedImfile 19 echo detCleanupStackedImfile 20 book listbook detCleanupStackedImfile 17 21 end 18 22 … … 24 28 active true 25 29 end 30 task detrend.cleanup.stack.load 31 active true 32 end 33 task detrend.cleanup.stack.run 34 active true 35 end 26 36 end 27 37 … … 33 43 active false 34 44 end 45 task detrend.cleanup.stack.load 46 active false 47 end 48 task detrend.cleanup.stack.run 49 active false 50 end 35 51 end 36 52 37 53 # this variable will cycle through the known database names 38 54 $detPendingStackedImfile_DB = 0 55 $detCleanupStackedImfile_DB = 0 39 56 40 57 # select images ready for detrend_stack.pl … … 50 67 51 68 stdout NULL 52 stderr $LOGDIR/detrend.stack.lo ad.log69 stderr $LOGDIR/detrend.stack.log 53 70 54 71 task.exec … … 122 139 sprintf outroot "%s/%s.%s.%s/%s.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 123 140 124 stdout $LOGDIR/detrend.stack. run.log125 stderr $LOGDIR/detrend.stack. run.log141 stdout $LOGDIR/detrend.stack.log 142 stderr $LOGDIR/detrend.stack.log 126 143 127 144 $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose … … 152 169 end 153 170 end 171 172 ########## cleanup stack ########### 173 task detrend.cleanup.stack.load 174 host local 175 176 periods -poll $LOADPOLL 177 periods -exec $LOADEXEC 178 periods -timeout 30 179 npending 1 180 active true 181 182 stdout NULL 183 stderr $LOGDIR/detrend.cleanup.stack.log 184 185 task.exec 186 if ($DB:n == 0) 187 option DEFAULT 188 command dettool -pendingcleanup_stacked -limit 20 189 else 190 # save the DB name for the exit tasks 191 option $DB:$detCleanupStackedImfile_DB 192 command dettool -pendingcleanup_stacked -limit 20 -dbname $DB:$detCleanupStackedImfile_DB 193 $detCleanupStackedImfile_DB ++ 194 if ($detCleanupStackedImfile_DB >= $DB:n) set detCleanupStackedImfile_DB = 0 195 end 196 end 197 198 # success 199 task.exit 0 200 # convert 'stdout' to book format 201 ipptool2book stdout detCleanupStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 202 if ($VERBOSE > 2) 203 book listbook detCleanupStackedImfile 204 end 205 206 # delete existing entries in the appropriate pantaskStates 207 process_cleanup detCleanupStackedImfile 208 end 209 210 # locked list 211 task.exit default 212 showcommand failure 213 end 214 215 # operation times out? 216 task.exit timeout 217 showcommand timeout 218 end 219 end 220 221 # run the ipp_cleanup.pl script on pending images 222 task detrend.cleanup.stack.run 223 periods -poll $RUNPOLL 224 periods -exec $RUNEXEC 225 periods -timeout 60 226 active true 227 228 task.exec 229 book npages detCleanupStackedImfile -var N 230 if ($N == 0) break 231 if ($NETWORK == 0) break 232 233 # look for new images in detCleanupStackedImfile (pantaskState == INIT) 234 book getpage detCleanupStackedImfile 0 -var pageName -key pantaskState INIT 235 if ("$pageName" == "NULL") break 236 237 book setword detCleanupStackedImfile $pageName pantaskState RUN 238 book getword detCleanupStackedImfile $pageName det_id -var DET_ID 239 book getword detCleanupStackedImfile $pageName iteration -var ITERATION 240 book getword detCleanupStackedImfile $pageName class_id -var CLASS_ID 241 book getword detCleanupStackedImfile $pageName camera -var CAMERA 242 book getword detCleanupStackedImfile $pageName state -var CLEANUP_MODE 243 book getword detCleanupStackedImfile $pageName dbname -var DBNAME 244 245 # specify choice of local or remote host based on camera and chip (class_id) 246 set.host.for.camera $CAMERA FPA 247 248 stdout $LOGDIR/detrend.cleanup.stack.log 249 stderr $LOGDIR/detrend.cleanup.stack.log 250 251 # XXX is everything listed here needed? 252 $run = ipp_cleanup.pl --stage detrend.stack.imfile --stage_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE 253 add_standard_args run 254 255 # save the pageName for future reference below 256 options $pageName 257 258 # create the command line 259 if ($VERBOSE > 1) 260 echo command $run 261 end 262 command $run 263 end 264 265 # default exit status 266 task.exit default 267 process_exit detCleanupStackedImfile $options:0 $JOB_STATUS 268 end 269 270 # operation timed out? 271 task.exit timeout 272 showcommand timeout 273 book setword detCleanupStackedImfile $options:0 pantaskState TIMEOUT 274 end 275 end 276
Note:
See TracChangeset
for help on using the changeset viewer.
