Changeset 37543 for tags/ipp-pv3-20140717
- Timestamp:
- Oct 30, 2014, 4:18:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_mk_staticsky_mdc.pl
r37442 r37543 18 18 defined($compmap_file); 19 19 20 if ( $#ARGV% 2 != 0) {21 die "Do not have a matched pair of path_base/stack_id values ";20 if (($#ARGV + 1) % 2 != 0) { 21 die "Do not have a matched pair of path_base/stack_id values $#ARGV"; 22 22 } 23 23 … … 27 27 chomp; 28 28 my ($symbolic_name,$disk_name) = split /\s+/; 29 $symbolic_name =~ s%//%/%g; 30 $disk_name =~ s%//%/%g; 29 31 $component_map{$symbolic_name} = $disk_name; 30 32 } … … 34 36 35 37 36 $mdc_content .= "INPUT MULTI\n"; 38 my $mdc_content .= "INPUT MULTI\n"; 39 print $mdc_content; 37 40 38 #foreach my $path_base (@ARGV) { 41 39 42 for (my $index = 0; $index <= $#ARGV; $index += 2) { 40 43 my $path_base = $ARGV[$index]; … … 43 46 my $file = ""; 44 47 my $error = 0; 45 46 47 # print "PB: $path_base\n"; 48 $path_base =~ s%//%/%g; 48 49 49 50 #header 50 $mdc_content .= "INPUT ${counter}METADATA\n";51 $mdc_content .= "INPUT METADATA\n"; 51 52 $mdc_content .= " STACK_ID S64 " . $stack_id . "\n"; 52 53 … … 61 62 $mdc_content .= " RAW:VARIANCE STR $file\n"; 62 63 63 $file = do_checks("${path_base}.psf",$error);64 $mdc_content .= " PSF STR $file\n";65 66 64 $file = do_checks("${path_base}.unconv.num.fits",$error); 67 65 $mdc_content .= " RAW:EXPNUM STR $file\n"; 68 66 69 $file = do_checks("${path_base}.cmf",$error); 70 $mdc_content .= " SOURCES STR $file\n"; 67 $mdc_content .= "END\n\n"; 71 68 72 $mdc_content .= "END\n\n";73 # print "MDC: $mdc_content\n";74 69 # If we had no errors, print it and move on. 75 70 if ($error == 0) { … … 82 77 sub do_checks { 83 78 my ($cfile,$error) = @_; 84 # print ">$cfile<\n";79 # print STDERR ">$cfile<\n"; 85 80 if (! ((-e $cfile)&&(-s $cfile))) { # This cfile does not exist or is zero size. 86 81 my $disk = $component_map{$cfile}; 87 82 $cfile = "${disk}"; 88 83 if (! ((-e $cfile)&&(-s $cfile))) { # The other expected cfile did not exist. 89 # $cfile = ''; 84 # $cfile = ''; 85 # $cfile = $disk; 90 86 $error++; 91 die "Missing cfile $cfile !";87 die "Missing cfile $cfile ($disk) $mdc_content!"; 92 88 } 93 89 }
Note:
See TracChangeset
for help on using the changeset viewer.
