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/stack_skycell.pl

    r32379 r32562  
    492492    &my_die("Couldn't find expected output file: $file",  $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($file);
    493493
     494    # Funpack to confirm we've really made things correctly
     495    my $diskfile = $ipprc->file_resolve($file);
     496    if ($diskfile =~ /fits/) {
     497        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $stack_id, $PS_EXIT_SYS_ERROR);
     498        my $check_command = "$funpack -S $diskfile > /dev/null";
     499        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     500            run(command => $check_command, verbose => $verbose);
     501        if (!$success) {
     502            &my_die("Output file not a valid fits file: $file", $stack_id, $PS_EXIT_SYS_ERROR);
     503        }
     504    }
     505    #####
     506
    494507    if ($replicate and $neb) {
    495508        $ipprc->replicate_file($file) or &my_die("failed to replicate: $file\n",  $stack_id, $PS_EXIT_SYS_ERROR);
Note: See TracChangeset for help on using the changeset viewer.