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

    r32379 r32562  
    404404        $ipprc->file_exists($file);
    405405
     406    # Funpack to confirm we've really made things correctly
     407    my $diskfile = $ipprc->file_resolve($file);
     408    if ($diskfile =~ /fits/) {
     409        my $funpack  = can_run('funpack') or &my_die ("Can't find funpack",  $cam_id, $PS_EXIT_SYS_ERROR);
     410        my $check_command = "$funpack -S $diskfile > /dev/null";
     411        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     412            run(command => $check_command, verbose => $verbose);
     413        if (!$success) {
     414            &my_die("Output file not a valid fits file: $file",  $cam_id, $PS_EXIT_SYS_ERROR);
     415        }
     416    }
     417    #####
     418
     419
    406420    my $scheme = file_scheme($file);
    407421    if ($replicate and $scheme and (file_scheme($file) eq 'neb')) {
Note: See TracChangeset for help on using the changeset viewer.