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

    r32469 r32562  
    422422    &my_die("Couldn't find expected output file: $file",  $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($file);
    423423
     424    # Funpack to confirm we've really made things correctly
     425    my $diskfile = $ipprc->file_resolve($file);
     426    if ($diskfile =~ /fits/) {
     427        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR);
     428        my $check_command = "$funpack -S $diskfile > /dev/null";
     429        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     430            run(command => $check_command, verbose => $verbose);
     431        if (!$success) {
     432            &my_die("Output file not a valid fits file: $file", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR);
     433        }
     434    }
     435    #####
     436
    424437    if ($replicate and $neb) {
    425438        $ipprc->replicate_file($file) or &my_die("failed to replicate: $file\n",  $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR);
Note: See TracChangeset for help on using the changeset viewer.