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

    r32487 r32562  
    757757        &my_die("Couldn't find expected output file: $file",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    758758    }
     759    # Funpack to confirm we've really made things correctly
     760    my $diskfile = $ipprc->file_resolve($file);
     761    if ($diskfile =~ /fits/) {
     762        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     763        my $check_command = "$funpack -S $diskfile > /dev/null";
     764        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     765            run(command => $check_command, verbose => $verbose);
     766        if (!$success) {
     767            &my_die("Output file not a valid fits file: $file", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     768        }
     769    }
     770    #####
    759771
    760772    if ($replicate and $neb) {
Note: See TracChangeset for help on using the changeset viewer.