Changeset 31565
- Timestamp:
- May 24, 2011, 2:47:49 PM (15 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
dist_advancerun.pl (modified) (1 diff)
-
dist_bundle.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_advancerun.pl
r30489 r31565 114 114 $tool_cmd = "$staticskytool -sky_id"; 115 115 $list_mode = "-result"; 116 $component_key = " ";116 $component_key = "skycell_id"; 117 117 } elsif ($stage eq "diff") { 118 118 $tool_cmd = "$difftool -diff_id"; -
trunk/ippScripts/scripts/dist_bundle.pl
r31505 r31565 62 62 my $streaksrelease = can_run('streaksrelease') or (warn "Can't find streaksrelease" and $missing_tools = 1); 63 63 my $bgtool = can_run('bgtool') or (warn "Can't find bgtool" and $missing_tools = 1); 64 my $staticskytool = can_run('staticskytool') or (warn "Can't find staticskytool" and $missing_tools = 1); 64 65 my $file_cmd = can_run('file') or (warn "can't find program file" and $missing_tools = 1); 65 66 my $zcat = can_run('zcat') or (warn "can't find program zcat" and $missing_tools = 1); … … 124 125 $ipprc->outroot_prepare($outroot); 125 126 127 my $num_sky_inputs; 128 if ($stage eq 'sky') { 129 $num_sky_inputs = get_num_sky_inputs($stage_id); 130 } 126 131 # Get the list of data products for this component 127 132 # note: We my_die in get_file_list if something goes wrong. 128 133 129 my $file_list = get_file_list($stage, $component, $path_base, $clean );134 my $file_list = get_file_list($stage, $component, $path_base, $clean, $num_sky_inputs); 130 135 131 136 if (($stage ne 'raw') and ($stage ne 'fake') and !$poor_quality) { … … 481 486 my $path_base = shift; 482 487 my $clean = shift; 488 my $num_sky_inputs = shift; 483 489 484 490 my @file_list; … … 532 538 $config_file_rule = "PPSTACK.CONFIG"; 533 539 } elsif ($stage eq "sky") { 534 $config_file_rule = "PSPHOT.STACK.CONFIG"; 540 if ($num_sky_inputs > 1) { 541 $config_file_rule = "PSPHOT.STACK.CONFIG"; 542 } else { 543 $config_file_rule = "PSPHOT.SKY.CONFIG"; 544 } 535 545 } else { 536 546 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); … … 628 638 return \@file_list; 629 639 } 640 sub get_num_sky_inputs { 641 my $sky_id = shift; 642 643 my $command = "$staticskytool -inputs -sky_id $sky_id -simple"; 644 $command .= " -dbname $dbname" if $dbname; 645 $command .= " | wc"; 646 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 647 run(command => $command, verbose => $verbose); 648 unless ($success) { 649 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 650 &my_die("Unable to perform $command: $error_code", $component, $error_code); 651 } 652 my ($num_inputs, $words, $chars) = split " ", (join "", @$stdout_buf); 653 if (!$num_inputs) { 654 $num_inputs = "undefined" if !defined $num_inputs; 655 &my_die("unexpected number of static sky inputs $num_inputs", $PS_EXIT_PROG_ERROR, $component, $error_code); 656 } 657 658 return $num_inputs; 659 } 630 660 631 661 sub my_die
Note:
See TracChangeset
for help on using the changeset viewer.
