- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/warp_skycell.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/ippScripts/scripts/warp_skycell.pl
r23594 r24244 57 57 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 58 58 pod2usage( 59 -msg => "Required options: --warp_id -- skycell_id --tess_dir --camera --outroot --run-state",59 -msg => "Required options: --warp_id --warp_skyfile_id --skycell_id --tess_dir --camera --outroot --run-state", 60 60 -exitval => 3, 61 61 ) unless defined $warp_id … … 81 81 { 82 82 # XXX change -tess_id to -tess_dir when db schema is updated 83 my $command = "$warptool -scmap -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_dir"; 83 my $command = "$warptool -scmap"; 84 $command .= " -warp_id $warp_id"; 85 $command .= " -skycell_id $skycell_id"; 86 # $command .= " -tess_id $tess_dir"; XXX I don't think this is necessary or useful 84 87 $command .= " -dbname $dbname" if defined $dbname; 85 88 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 175 178 # Run pswarp 176 179 my $cmdflags; 177 my $accept = 1; # Accept the skycell?178 180 my $do_stats; 179 181 unless ($no_op) { … … 200 202 $do_stats = 1; 201 203 } else { 202 $command .= " -ipprc $configuration"; 204 #$command .= " -ipprc $configuration"; 205 my $resolved = $ipprc->file_resolve($configuration); 206 $command .= " -ipprc $resolved"; 203 207 } 204 208 if ($do_stats) { … … 215 219 216 220 if ($do_stats) { 217 # Check first for the stats file , and if the ACCEPT flag is set.221 # Check first for the stats file 218 222 my $outputStatsReal = $ipprc->file_resolve($outputStats); 219 223 &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal; 224 &my_die("Stats file has zero size: $outputStats", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless -s $outputStatsReal; 220 225 221 226 # measure chip stats … … 232 237 chomp $cmdflags; 233 238 234 if ($cmdflags =~ /-accept/) { 239 my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag 240 241 if (!$quality) { 235 242 &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage); 236 243 &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); … … 249 256 $command .= " -magicked" if $magicked; 250 257 251 $command .= " -uri $outputImage" if $accept;258 $command .= " -uri $outputImage" if !$quality; 252 259 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 253 $command .= " $cmdflags" if $accept;260 $command .= " $cmdflags"; 254 261 $command .= " -hostname $host" if defined $host; 255 262 $command .= " -dbname $dbname" if defined $dbname; … … 301 308 $command .= " -path_base $outroot"; 302 309 $command .= " -hostname $host" if defined $host; 310 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 303 311 } else { 304 312 $command .= " -updateskyfile"; … … 306 314 $command .= " -warp_id $warp_id"; 307 315 $command .= " -skycell_id $skycell_id"; 308 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 309 $command .= " -code $exit_code"; 316 $command .= " -fault $exit_code"; 310 317 $command .= " -dbname $dbname" if defined $dbname; 311 318 run(command => $command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
