Changeset 32749
- Timestamp:
- Nov 22, 2011, 10:23:15 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/videophot_process.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/videophot_process.pl
r32556 r32749 37 37 } 38 38 my ($vp_id, $camera, $outroot, $dest_id, $dbname, $verbose, $no_update, $no_op, $redirect, $save_temps); 39 my ($product, $ ds_dbname, $ds_dbhost);39 my ($product, $save_video_cube, $ds_dbname, $ds_dbhost); 40 40 41 41 GetOptions( … … 45 45 'dest_id=s' => \$dest_id, 46 46 'product=s' => \$product, 47 'save-video-cube' => \$save_video_cube, 47 48 'ds_dbname=s' => \$ds_dbname, 48 49 'ds_dbhost=s' => \$ds_dbhost, … … 141 142 } 142 143 # dump the video cell and the video table to a file 143 unless ($no_op) {144 if ($save_video_cube) { 144 145 my $output = $path_base . ".fits"; 145 146 my $extname = "$cell_id"; 146 147 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"; 152 157 } 153 } else {154 print "Not executing: $command\n";155 158 } 156 159 … … 193 196 print $reglist "$logDest|||text|\n"; 194 197 } 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 } 197 205 foreach my $cell (@$cells) { 198 206 my $path_base = $cell->{path_base}; … … 203 211 print $reglist "$file|||$type|\n"; 204 212 } 205 206 213 } 207 214 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.
