Changeset 19098
- Timestamp:
- Aug 17, 2008, 2:38:32 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r18934 r19098 119 119 my $outputWeight = $ipprc->filename("PSWARP.OUTPUT.WEIGHT", $outroot, $skycell_id); 120 120 my $outputSources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $outroot, $skycell_id); 121 my $outputPSF = $ipprc->filename("PSPHOT.PSF.S AVE", $outroot, $skycell_id);121 my $outputPSF = $ipprc->filename("PSPHOT.PSF.SKY.SAVE", $outroot); 122 122 my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outroot, $skycell_id ); 123 123 my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outroot, $skycell_id ); … … 144 144 &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask); 145 145 146 my $astrom; # Astrometry file 147 if ($astromSource eq 'PSASTRO.OUTPUT.MEF') { 148 $astrom = $ipprc->filename($astromSource, $imfile->{cam_path_base}); 149 } elsif ($astromSource eq 'PSASTRO.OUTPUT') { 150 my $chipRoot = $imfile->{chip_path_base}; 151 my $classID = $imfile->{class_id}; 152 $astrom = $ipprc->filename($astromSource, $chipRoot, $classID); # Astrometry file 153 } 146 my $astrom = $ipprc->filename($astromSource, $imfile->{cam_path_base}); 154 147 155 148 &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless defined $astrom and $ipprc->file_exists($astrom); … … 161 154 if (!$wrote_astrom) { 162 155 print $astromFile "$astrom\n"; 163 # XXX simplify this? only ever have one file for astrometry (must be MEF) 164 if ($astromSource eq 'PSASTRO.OUTPUT.MEF') { 165 $wrote_astrom = 1; 166 } 156 $wrote_astrom = 1; 167 157 } 168 158 } … … 178 168 my $command = "$pswarp"; 179 169 $command .= " -list $imageName"; 170 # $command .= " -threads 4"; 180 171 $command .= " -masklist $maskName"; 181 172 $command .= " -weightlist $weightName"; … … 184 175 $command .= " -stats $outputStats"; 185 176 $command .= " -recipe PPSTATS WARPSTATS"; 177 $command .= " -F PSPHOT.PSF.SAVE PSPHOT.PSF.SKY.SAVE"; 186 178 $command .= " -psf"; # Turn on PSF determination 187 179 $command .= " -tracedest $traceDest -log $logDest"; … … 207 199 or &my_die("Unable to parse metadata config", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_PROG_ERROR); 208 200 $accept = metadataLookupBool($metadata, "ACCEPT"); 201 202 # $accept is set above based on the fraction of lit pixels 203 # XXX for some files, there may not be enough stars to find a good psf. these should be dropped as well 204 $accept &= $ipprc->file_exists($outputPSF); 205 209 206 if ($accept) { 210 207 $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_PROG_ERROR); … … 214 211 &my_die("Couldn't find expected output file: $outputWeight", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight); 215 212 &my_die("Couldn't find expected output file: $outputSources", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 216 &my_die("Couldn't find expected output file: $outputPSF", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputPSF);213 # &my_die("Couldn't find expected output file: $outputPSF", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputPSF); 217 214 # &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1); 218 215 # &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2); … … 222 219 unless ($no_update) { 223 220 # XXX change -tess_id to -tess_dir when db is updated 224 my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_dir"; 225 $command .= " -ignore" if not $accept; # Completed succesfully, but can't produce product 226 $command .= " -uri $outputImage -path_base $outroot" if $accept; 227 $command .= $stats->cmdflags() if $accept; 228 $command .= " -hostname $host" if defined $host; 229 $command .= " -dbname $dbname" if defined $dbname; 221 my $command = "$warptool -addwarped"; 222 $command .= " -warp_id $warp_id"; 223 $command .= " -skycell_id $skycell_id"; 224 $command .= " -tess_id $tess_dir"; 225 $command .= " -path_base $outroot"; # needed for logfile lookups 226 $command .= " -ignore" if not $accept; # Completed succesfully, but can't produce product 227 $command .= " -uri $outputImage" if $accept; 228 $command .= $stats->cmdflags() if $accept; 229 $command .= " -hostname $host" if defined $host; 230 $command .= " -dbname $dbname" if defined $dbname; 230 231 231 232 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 249 250 if (defined $warp_id and defined $skycell_id and defined $tess_dir and not $no_update) { 250 251 # XXX change -tess_id to -tess_dir when db is updated 251 my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_dir -code $exit_code"; 252 my $command = "$warptool -addwarped"; 253 $command .= " -warp_id $warp_id"; 254 $command .= " -skycell_id $skycell_id"; 255 $command .= " -tess_id $tess_dir"; 256 $command .= " -code $exit_code"; 257 $command .= " -path_base $outroot"; 252 258 $command .= " -hostname $host" if defined $host; 253 259 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
