Changeset 14261 for trunk/ippScripts/scripts/warp_skycell.pl
- Timestamp:
- Jul 16, 2007, 6:46:54 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r14228 r14261 97 97 my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id ); 98 98 my $outputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outputRoot, $skycell_id); 99 my $outputWeight = $ipprc->filename("PSWARP.OUTPUT.WEIGHT", $outputRoot, $skycell_id); 99 100 my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outputRoot, $skycell_id ); 100 101 my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id ); … … 103 104 104 105 # Get list of filenames 105 my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1); 106 my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1); 106 my ($imageFile, $imageName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1); 107 my ($maskFile, $maskName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1); 108 my ($weightFile, $weightName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.weight.list.XXXX", UNLINK => 1); 107 109 my $inputAstrom; 108 110 foreach my $imfile (@$imfiles) { 109 111 my $image = $imfile->{uri}; # Image name 110 112 my $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 111 my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name 113 my $weight = $ipprc->filename("PPIMAGE.CHIP.WEIGHT", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 114 my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name 112 115 113 116 &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image); … … 115 118 &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($astrom); 116 119 117 print $list1File ( $image . "\n"); 118 print $list2File ( $mask . "\n"); 120 print $imageFile ( $image . "\n"); 121 print $maskFile ( $mask . "\n"); 122 print $weightFile ( $weight . "\n"); 119 123 if (defined $inputAstrom) { 120 124 &my_die("Astrometry files don't match: $inputAstrom vs $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $inputAstrom eq $astrom; … … 123 127 } 124 128 } 125 close $list1File; 126 close $list2File; 129 close $imageFile; 130 close $maskFile; 131 close $weightFile; 127 132 128 133 # Run pswarp 129 134 unless ($no_op) { 130 my $command = "$pswarp -list $list1Name"; 131 $command .= " -masklist $list2Name"; 135 my $command = "$pswarp -list $imageName"; 136 $command .= " -masklist $maskName"; 137 $command .= " -weightlist $weightName"; 132 138 $command .= " -astrom $inputAstrom"; 133 139 $command .= " $outputRoot $skyFile"; … … 143 149 &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage); 144 150 &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 151 &my_die("Couldn't find expected output file: $outputWeight", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight); 145 152 &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats); 146 153 # &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
Note:
See TracChangeset
for help on using the changeset viewer.
