Changeset 16021
- Timestamp:
- Jan 6, 2008, 2:00:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r15738 r16021 134 134 135 135 # Get list of filenames 136 my ($imageFile, $imageName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX",UNLINK => !$save_temps);137 my ($maskFile, $maskName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX",UNLINK => !$save_temps);136 my ($imageFile, $imageName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => !$save_temps); 137 my ($maskFile, $maskName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => !$save_temps); 138 138 my ($weightFile, $weightName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.weight.list.XXXX", UNLINK => !$save_temps); 139 my $inputAstrom; 139 my ($astromFile, $astromName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.astrom.list.XXXX", UNLINK => !$save_temps); 140 141 # XXXX this is inconsistent: what is the goal of inputAstrom? 142 my $inputAstrom = 0; 140 143 foreach my $imfile (@$imfiles) { 141 144 my $image = $imfile->{uri}; # Image name … … 146 149 &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask); 147 150 148 my $astrom; # Astrometry file149 if ($astromSource and $astromSource ne 'NULL') {151 my $astrom; # Astrometry file 152 if ($astromSource eq 'PSASTRO.OUTPUT.MEF') { 150 153 $astrom = $ipprc->filename($astromSource, $imfile->{cam_path_base}); 151 154 &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($astrom); 152 } 153 154 print $imageFile ( $image . "\n"); 155 print $maskFile ( $mask . "\n"); 156 print $weightFile ( $weight . "\n"); 157 158 if (defined $inputAstrom and defined $astrom) { 159 &my_die("Astrometry files don't match: $inputAstrom vs $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $inputAstrom eq $astrom; 160 } else { 161 $inputAstrom = $astrom; 155 $inputAstrom = 1; 156 } 157 if ($astromSource eq 'PSASTRO.OUTPUT') { 158 my $chipRoot = $imfile->{chip_path_base}; 159 my $classID = $imfile->{class_id}; 160 $astrom = $ipprc->filename($astromSource, $chipRoot, $classID); # Astrometry file 161 $inputAstrom = 1; 162 } 163 164 if ($inputAstrom) { 165 print $imageFile "$image\n"; 166 print $maskFile "$mask\n"; 167 print $weightFile "$weight\n"; 168 print $astromFile "$astrom\n"; 162 169 } 163 170 } … … 165 172 close $maskFile; 166 173 close $weightFile; 174 close $astromFile; 167 175 168 176 # Run pswarp 169 177 my $accept = 1; # Accept the skycell? 170 178 unless ($no_op) { 171 my $command = "$pswarp -list $imageName"; 179 my $command = "$pswarp"; 180 $command .= " -list $imageName"; 172 181 $command .= " -masklist $maskName"; 173 182 $command .= " -weightlist $weightName"; 174 $command .= " -astrom $inputAstrom" if defined$inputAstrom;183 $command .= " -astromlist $astromName" if $inputAstrom; 175 184 $command .= " $outputRoot $skyFile"; 176 185 $command .= " -stats $outputStats"; 177 186 $command .= " -recipe PPSTATS WARPSTATS"; 178 $command .= " -psf"; # Turn on PSF determination187 # $command .= " -psf"; # Turn on PSF determination 179 188 $command .= " -tracedest $traceDest -log $logDest"; 180 189 … … 205 214 &my_die("Couldn't find expected output file: $outputWeight", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight); 206 215 &my_die("Couldn't find expected output file: $outputSources", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 207 &my_die("Couldn't find expected output file: $outputPSF", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputPSF);216 # &my_die("Couldn't find expected output file: $outputPSF", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputPSF); 208 217 # &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1); 209 218 # &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
Note:
See TracChangeset
for help on using the changeset viewer.
