IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32562


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.

Location:
trunk/ippScripts/scripts
Files:
5 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')) {
  • 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) {
  • 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);
  • 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);
  • 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.