Changeset 26638
- Timestamp:
- Jan 19, 2010, 5:24:21 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/diff_skycell.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/diff_skycell.pl
r26568 r26638 230 230 231 231 # Perform subtraction 232 unless ($no_op){232 { 233 233 my $command = "$ppSub $outroot"; 234 234 $command .= " -inimage $input"; … … 263 263 $command .= " -source_id $source_id" if defined $source_id; 264 264 265 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 266 run(command => $command, verbose => $verbose); 267 unless ($success) { 268 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 269 &my_die("Unable to perform ppSub: $error_code", $diff_id, $skycell_id, $error_code); 270 } 271 272 my $outputStatsReal = $ipprc->file_resolve($outputStats); 273 &my_die("Couldn't find expected output file: $outputStats", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal; 274 275 # measure chip stats 276 $command = "$ppStatsFromMetadata $outputStatsReal - DIFF_SKYCELL"; 277 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 278 run(command => $command, verbose => $verbose); 279 unless ($success) { 280 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 281 &my_die("Unable to perform ppStatsFromMetadata: $error_code", $diff_id, $skycell_id, $error_code); 282 } 283 foreach my $line (@$stdout_buf) { 284 $cmdflags .= " $line"; 285 } 286 chomp $cmdflags; 287 288 my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag 289 290 if (!$quality) { 291 &my_die("Couldn't find expected output file: $outputName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName); 292 &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 293 &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance); 294 &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 295 &my_die("Couldn't find expected output file: $jpeg1Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg1Name); 296 &my_die("Couldn't find expected output file: $jpeg2Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg2Name); 297 if ($inverse) { 298 &my_die("Couldn't find expected output file: $inverseName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseName); 299 &my_die("Couldn't find expected output file: $inverseMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseMask); 300 &my_die("Couldn't find expected output file: $inverseVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseVariance); 301 &my_die("Couldn't find expected output file: $inverseSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseSources); 302 } 265 unless ($no_op) { 266 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 267 run(command => $command, verbose => $verbose); 268 unless ($success) { 269 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 270 &my_die("Unable to perform ppSub: $error_code", $diff_id, $skycell_id, $error_code); 271 } 272 273 my $outputStatsReal = $ipprc->file_resolve($outputStats); 274 &my_die("Couldn't find expected output file: $outputStats", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal; 275 276 # measure chip stats 277 $command = "$ppStatsFromMetadata $outputStatsReal - DIFF_SKYCELL"; 278 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 279 run(command => $command, verbose => $verbose); 280 unless ($success) { 281 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 282 &my_die("Unable to perform ppStatsFromMetadata: $error_code", $diff_id, $skycell_id, $error_code); 283 } 284 foreach my $line (@$stdout_buf) { 285 $cmdflags .= " $line"; 286 } 287 chomp $cmdflags; 288 289 my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag 290 291 if (!$quality) { 292 &my_die("Couldn't find expected output file: $outputName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName); 293 &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 294 &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance); 295 &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 296 &my_die("Couldn't find expected output file: $jpeg1Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg1Name); 297 &my_die("Couldn't find expected output file: $jpeg2Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg2Name); 298 if ($inverse) { 299 &my_die("Couldn't find expected output file: $inverseName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseName); 300 &my_die("Couldn't find expected output file: $inverseMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseMask); 301 &my_die("Couldn't find expected output file: $inverseVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseVariance); 302 &my_die("Couldn't find expected output file: $inverseSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseSources); 303 } 304 } 305 } else { 306 print "Not executing: $command\n"; 303 307 } 304 308 }
Note:
See TracChangeset
for help on using the changeset viewer.
