IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 19, 2011, 5:20:49 PM (15 years ago)
Author:
watersc1
Message:

Implement funpack check in the check_outputs subroutine to verify that we've constructed uncorrupted fits files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/diff_skycell.pl

    r32379 r32562  
    460460    &my_die("Couldn't find expected output file: $file",  $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($file);
    461461
     462    # Funpack to confirm we've really made things correctly
     463    my $diskfile = $ipprc->file_resolve($file);
     464    if ($diskfile =~ /fits/) {
     465        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR);
     466        my $check_command = "$funpack -S $diskfile > /dev/null";
     467        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     468            run(command => $check_command, verbose => $verbose);
     469        if (!$success) {
     470            &my_die("Output file not a valid fits file: $file", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR);
     471        }
     472    }
     473    #####
     474
     475
    462476    if ($replicate and $neb) {
    463477        $ipprc->replicate_file($file) or &my_die("failed to replicate: $file\n",  $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR);
Note: See TracChangeset for help on using the changeset viewer.