Changeset 27513 for trunk/ippScripts/scripts/automate_stacks.pl
- Timestamp:
- Mar 29, 2010, 3:08:03 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/automate_stacks.pl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/automate_stacks.pl
r27512 r27513 55 55 56 56 # Grab options 57 my ( $date, $camera, $dbname, $logfile, $verbose );57 my ( $date, $camera, $dbname, $logfile, $verbose, $manual); 58 58 my ( $help, $isburning, $force_stack_count, $test_mode, $this_target_only, $this_filter_only); 59 59 my ( $check_registration, $define_burntool, $queue_burntool, $check_chips, $queue_chips); … … 125 125 my %comment_list= (); 126 126 my %stackable_list = (); 127 my %reduction_class = (); 127 128 my $retention_time = 9000; 128 129 … … 168 169 $stackable_list{$this_target} = ${ $tentry }{value}; 169 170 } 171 elsif (${ $tentry }{name} eq 'REDUCTION') { 172 $reduction_class{$this_target} = ${ $tentry }{value}; 173 } 170 174 } 171 175 } … … 307 311 $Nsummit_exps++; 308 312 if ($summit_fault) { 309 print STDERR "check_summit_copy: $date $exp_name has summit_fault $summit_fault";313 print STDERR "check_summit_copy: $date $exp_name has summit_fault $summit_fault"; 310 314 if ($exp_type ne 'OBJECT') { 311 315 print STDERR " (but I don't care).\n"; … … 450 454 my $target = shift; 451 455 452 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($date,$target);456 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 453 457 454 458 my $select = "-dateobs_begin ${date}T00:00:00 -dateobs_end ${date}T23:59:59 "; … … 469 473 $cmd .= " -comment '$comment' "; 470 474 } 475 if (defined($reduction)) { 476 $cmd .= " -set_reduction $reduction "; 477 } 471 478 $cmd .= " $select "; 472 479 if ($debug == 1) { … … 484 491 my $db = init_gpc_db(); 485 492 $date =~ s/-//g; 486 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($date,$target);493 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 487 494 488 495 my $sth = "SELECT exp_id from chipRun where data_group = '$data_group' AND exp_id = $exp_id"; … … 543 550 my ($Nexposures,$Nimfiles,$Nburntooled,$Nalready) = pre_chip_queue($date,$target); 544 551 if ($Nexposures == 0) { 545 print STDERR "execute_chips: Target $target on $date had no exposures.\n"; 552 print STDERR "execute_chips: Target $target on $date had no exposures.\n"; 553 next; 554 } 555 if ($Nalready != 0) { 556 print STDERR "execute_chips: Not queueing $target on $date due to already existing exposures.\n"; 546 557 next; 547 558 } 548 if ($Nalready != 0) {549 print STDERR "execute_chips: Not queueing $target on $date due to already existing exposures.\n";550 next;551 }552 559 if ($Nimfiles != $Nburntooled) { 553 print STDERR "execute_chips: Target $target on $date is not fully burntooled.\n";560 print STDERR "execute_chips: Target $target on $date is not fully burntooled.\n"; 554 561 $metadata_out{nsState} = 'NEEDSBURNING'; 555 562 next; … … 574 581 my $filter = shift; 575 582 576 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($date,$target);583 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 577 584 578 585 my $select = "-select_dateobs_begin ${date}T00:00:00 -select_dateobs_end ${date}T23:59:59 "; … … 603 610 my $db = init_gpc_db(); 604 611 $date =~ s/-//g; 605 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($date,$target);612 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 606 613 607 614 my $sth = "SELECT skycell_id from stackRun where data_group = '$data_group' AND skycell_id = '$skycell' AND filter = '$filter'"; … … 616 623 my $filter = shift; 617 624 618 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($date,$target);625 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 619 626 # check warp stage == chip stage 620 627 my $db = init_gpc_db(); … … 716 723 my $cleaning_date = $dt->ymd; 717 724 718 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group ) = get_tool_parameters($cleaning_date,$target);725 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($cleaning_date,$target); 719 726 720 727 my $args .= " -dbname gpc1 -updaterun -set_state goto_cleaned -state full -data_group $data_group "; … … 779 786 my $data_group = "${target}.${trunc_date}"; 780 787 my $tess_id = $tessID_list{$target}; 781 782 return($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group );788 my $reduction = $reduction_class{$target}; 789 return($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction); 783 790 } 784 791
Note:
See TracChangeset
for help on using the changeset viewer.
