Changeset 36047 for trunk/ippScripts/scripts/dist_bundle.pl
- Timestamp:
- Aug 27, 2013, 2:40:35 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/dist_bundle.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_bundle.pl
r35957 r36047 53 53 'PPSTACK.OUTPUT.MASK' => 'mask', 54 54 'PPSTACK.OUTPUT.VARIANCE' => 'variance' ); 55 my %sky_cleaned = (); 56 my %skycal_cleaned = (); 55 my %empty_cleaned = (); 57 56 58 57 … … 135 134 my $file_list = get_file_list($stage, $component, $path_base, $clean, $num_sky_inputs); 136 135 137 if (($stage ne 'raw') and ($stage ne 'fake') and !$poor_quality) {136 if (($stage ne 'raw') and ($stage ne 'fake') and ($stage ne 'stack_summary') and !$poor_quality) { 138 137 # If the file list is empty it is an error because we should at least get a config dump file 139 138 # except for fake stage which doesn't do anything yet … … 461 460 } elsif ($stage eq "stack") { 462 461 $type = $stack_cleaned{$rule}; 463 } elsif ($stage eq "sky") { 464 $type = $sky_cleaned{$rule}; 465 } elsif ($stage eq "skycal") { 466 $type = $skycal_cleaned{$rule}; 462 } elsif ($stage eq "sky" or $stage eq 'skycal' or $stage eq 'stack_summary') { 463 $type = $empty_cleaned{$rule}; 467 464 } else { 468 465 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); … … 552 549 } elsif ($stage eq "skycal") { 553 550 $config_file_rule = "PSASTRO.CONFIG"; 551 } elsif ($stage eq "stack_summary") { 552 # stack_summary stage does not use a config dump file. 553 return build_stack_summary_file_list($path_base, \@file_list); 554 554 } else { 555 555 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); … … 666 666 if (!$num_inputs) { 667 667 $num_inputs = "undefined" if !defined $num_inputs; 668 &my_die("unexpected number of static sky inputs $num_inputs", $ PS_EXIT_PROG_ERROR, $component, $error_code);668 &my_die("unexpected number of static sky inputs $num_inputs", $component, $error_code); 669 669 } 670 670 671 671 return $num_inputs; 672 } 673 674 # For stack_summary stage, we don't have a config dump file to give us the list of files. 675 # For now run neb-ls on the path base and take everything that matches. 676 sub build_stack_summary_file_list { 677 my ($path_base, $file_list) = @_; 678 679 my $scheme = file_scheme($path_base); 680 681 if (!$scheme or $scheme ne 'neb') { 682 &my_die("Building bundles for stack_summary not supported for no nebulous path_base.", 683 $component, $PS_EXIT_PROG_ERROR); 684 } 685 686 my $command = "neb-ls $path_base" . '%'; 687 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 688 run(command => $command, verbose => $verbose); 689 unless ($success) { 690 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 691 &my_die("Unable to perform $command: $error_code", $component, $error_code); 692 } 693 my $nebls_output = join "", @$stdout_buf; 694 695 my @files = split "\n", $nebls_output; 696 697 my $i = 0; 698 foreach my $f (@files) { 699 my %file; 700 $file{file_rule} = sprintf 'RULE.%d', $i++; 701 $file{name} = 'neb://any/' . $f; 702 push @$file_list, \%file; 703 } 704 705 return $file_list; 672 706 } 673 707
Note:
See TracChangeset
for help on using the changeset viewer.
