IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32749


Ignore:
Timestamp:
Nov 22, 2011, 10:23:15 AM (15 years ago)
Author:
bills
Message:

make extaction of the video cube optional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/videophot_process.pl

    r32556 r32749  
    3737}
    3838my ($vp_id, $camera, $outroot, $dest_id, $dbname, $verbose, $no_update, $no_op, $redirect, $save_temps);
    39 my ($product, $ds_dbname, $ds_dbhost);
     39my ($product, $save_video_cube, $ds_dbname, $ds_dbhost);
    4040
    4141GetOptions(
     
    4545    'dest_id=s'         => \$dest_id,
    4646    'product=s'         => \$product,
     47    'save-video-cube'   => \$save_video_cube,
    4748    'ds_dbname=s'       => \$ds_dbname,
    4849    'ds_dbhost=s'       => \$ds_dbhost,
     
    141142        }
    142143        # dump the video cell and the video table to a file
    143         unless ($no_op) {
     144        if ($save_video_cube) {
    144145            my $output = $path_base . ".fits";
    145146            my $extname = "$cell_id";
    146147            my $command = "$dumpvideo $uri $extname $output -includetable";
    147             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    148                 run(command => $command, verbose => $verbose);
    149             unless ($success) {
    150                 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    151                 &my_die("Unable to perform dumpvideo: $error_code", $vp_id, $error_code);
     148            unless ($no_op) {
     149                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     150                    run(command => $command, verbose => $verbose);
     151                unless ($success) {
     152                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     153                    &my_die("Unable to perform dumpvideo: $error_code", $vp_id, $error_code);
     154                }
     155            } else {
     156                print "Not executing: $command\n";
    152157            }
    153         } else {
    154             print "Not executing: $command\n";
    155158        }
    156159
     
    193196        print $reglist "$logDest|||text|\n";
    194197    }
    195     my @exts = qw( vpt fits );
    196     my @types = qw( table fits );
     198    # list of extensions and types for files to distribute
     199    my @exts = qw( vpt );
     200    my @types = qw( table );
     201    if ($save_video_cube) {
     202        push @exts, 'fits';
     203        push @types, 'fits';
     204    }
    197205    foreach my $cell (@$cells) {
    198206        my $path_base = $cell->{path_base};
     
    203211            print $reglist "$file|||$type|\n";
    204212        }
    205            
    206213    }
    207214    close $reglist or &my_die("failed to close $reglistName", $vp_id, $PS_EXIT_UNKNOWN_ERROR);
Note: See TracChangeset for help on using the changeset viewer.