Changeset 13859
- Timestamp:
- Jun 16, 2007, 3:51:06 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r13829 r13859 97 97 my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1); 98 98 my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1); 99 my ($list3File, $list3Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.astrom.list.XXXX", UNLINK => 1);99 my $inputAstrom; 100 100 foreach my $imfile (@$imfiles) { 101 101 my $image = $imfile->{uri}; # Image name 102 my $mask = $ipprc->filename("PPIMAGE. OUTPUT.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name102 my $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 103 103 my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name 104 104 … … 109 109 print $list1File ( $image . "\n"); 110 110 print $list2File ( $mask . "\n"); 111 print $list3File ( $astrom . "\n"); 111 if (defined $inputAstrom) { 112 &my_die("Astrometry files don't match: $inputAstrom vs $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $inputAstrom eq $astrom; 113 } else { 114 $inputAstrom = $astrom; 115 } 112 116 } 113 117 close $list1File; 114 118 close $list2File; 115 close $list3File;116 119 117 120 # Run pswarp … … 120 123 my $command = "$pswarp -list $list1Name"; 121 124 $command .= " -masklist $list2Name"; 122 $command .= " -astrom list $list3Name";125 $command .= " -astrom $inputAstrom"; 123 126 $command .= " $outputRoot $skyFile"; 124 127 $command .= " -stats $outputStats"; … … 142 145 my @contents = <$statsFile>; # Contents of file 143 146 close $statsFile; 144 my $metadata = $mdcParser->parse(join "", @contents) 145 or &my_die("Unable to parse metadata config", $warp_id, $skycell_id, $tess_id, $PS_EXIT_PROG_ERROR); 146 $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $warp_id, $skycell_id, $tess_id, $PS_EXIT_PROG_ERROR); 147 my $contents = join "", @contents; 148 149 # Just in case the statistics was impossible to do, e.g., small overlap: 150 if ($contents !~ /^\s*$/) { 151 my $metadata = $mdcParser->parse($contents) 152 or &my_die("Unable to parse metadata config", $warp_id, $skycell_id, $tess_id, $PS_EXIT_PROG_ERROR); 153 $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $warp_id, $skycell_id, $tess_id, $PS_EXIT_PROG_ERROR); 154 } 147 155 } 148 156
Note:
See TracChangeset
for help on using the changeset viewer.
