Index: /tags/ipp-20111110/ippScripts/scripts/videophot_process.pl
===================================================================
--- /tags/ipp-20111110/ippScripts/scripts/videophot_process.pl	(revision 32752)
+++ /tags/ipp-20111110/ippScripts/scripts/videophot_process.pl	(revision 32753)
@@ -37,5 +37,5 @@
 }
 my ($vp_id, $camera, $outroot, $dest_id, $dbname, $verbose, $no_update, $no_op, $redirect, $save_temps);
-my ($product, $ds_dbname, $ds_dbhost);
+my ($product, $save_video_cube, $ds_dbname, $ds_dbhost);
 
 GetOptions(
@@ -45,4 +45,5 @@
     'dest_id=s'         => \$dest_id,
     'product=s'         => \$product,
+    'save-video-cube'   => \$save_video_cube,
     'ds_dbname=s'       => \$ds_dbname,
     'ds_dbhost=s'       => \$ds_dbhost,
@@ -141,16 +142,18 @@
         }
         # dump the video cell and the video table to a file
-        unless ($no_op) {
+        if ($save_video_cube) {
             my $output = $path_base . ".fits";
             my $extname = "$cell_id";
             my $command = "$dumpvideo $uri $extname $output -includetable";
-            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
-            unless ($success) {
-                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-                &my_die("Unable to perform dumpvideo: $error_code", $vp_id, $error_code);
+            unless ($no_op) {
+                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+                    run(command => $command, verbose => $verbose);
+                unless ($success) {
+                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+                    &my_die("Unable to perform dumpvideo: $error_code", $vp_id, $error_code);
+                }
+            } else {
+                print "Not executing: $command\n";
             }
-        } else {
-            print "Not executing: $command\n";
         }
 
@@ -193,6 +196,11 @@
         print $reglist "$logDest|||text|\n";
     }
-    my @exts = qw( vpt fits );
-    my @types = qw( table fits );
+    # list of extensions and types for files to distribute
+    my @exts = qw( vpt );
+    my @types = qw( table );
+    if ($save_video_cube) {
+        push @exts, 'fits';
+        push @types, 'fits';
+    }
     foreach my $cell (@$cells) {
         my $path_base = $cell->{path_base};
@@ -203,5 +211,4 @@
             print $reglist "$file|||$type|\n";
         }
-            
     }
     close $reglist or &my_die("failed to close $reglistName", $vp_id, $PS_EXIT_UNKNOWN_ERROR);
Index: /tags/ipp-20111110/ippTools/src/vptool.c
===================================================================
--- /tags/ipp-20111110/ippTools/src/vptool.c	(revision 32752)
+++ /tags/ipp-20111110/ippTools/src/vptool.c	(revision 32753)
@@ -282,5 +282,4 @@
     psFree(where);
 
-    psStringAppend(&query, "\nGROUP BY vp_id HAVING");
     psStringAppend(&query, "\nORDER BY priority DESC, vp_id");
 
@@ -597,34 +596,16 @@
 static bool processedcellMode(pxConfig *config)
 {
-return false;
-#ifdef notyet
     PS_ASSERT_PTR_NON_NULL(config, NULL);
 
     PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
-    PXOPT_LOOKUP_BOOL(faulted, config->args, "-faulted", false);
-    PXOPT_LOOKUP_BOOL(allfiles, config->args, "-allfiles", false);
-    if (allfiles) {
-        faulted = false;
-    }
-    PXOPT_LOOKUP_BOOL(pstamp_order, config->args, "-pstamp_order", false);
 
     psMetadata *where = psMetadataAlloc();
     pxchipGetSearchArgs (config, where); // chipRun, chipProcessedImfile, rawExp
-    PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "==");
-    PXOPT_COPY_S64(config->args, where, "-chip_imfile_id", "chipImfile.chip_imfile_id", "==");
-    PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "==");
-    PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "==");
-    pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "LIKE");
-    pxAddLabelSearchArgs (config, where, "-data_group", "chipRun.data_group", "LIKE");
-    PXOPT_COPY_S64(config->args, where, "-magicked", "chipProcessedImfile.magicked", "==");
-
-    psString where2 = NULL;
-    pxmagicAddWhere(config, &where2, "chipProcessedImfile");
-    // add cuts on ra and decl if supplied
-    if (!pxspaceAddWhere(config, &where2, "rawExp")) {
-        psError(psErrorCodeLast(), false, "pxSpaceAddWhere failed");
-        return false;
-    }
+    PXOPT_COPY_S64(config->args, where, "-vp_id", "vp_id", "==");
+    PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "==");
+    PXOPT_COPY_STR(config->args, where, "-cell_id", "cell_id", "==");
+    pxAddLabelSearchArgs (config, where, "-label", "vpRun.label", "LIKE");
+    pxAddLabelSearchArgs (config, where, "-data_group", "vpRun.data_group", "LIKE");
 
     psString query = pxDataGet("vptool_processedcell.sql");
@@ -636,30 +617,13 @@
     if (psListLength(where->list)) {
         psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
-        psStringAppend(&query, " WHERE %s %s", whereClause, where2 ? where2 : "");
+        psStringAppend(&query, " WHERE %s", whereClause);
         psFree(whereClause);
-    } else if (psMetadataLookupBool(NULL, config->args, "-all") || (faulted || where2)) {
-        psStringAppend(&query, " WHERE chipRun.chip_id IS NOT NULL %s", where2 ? where2 : "");
     } else {
         psFree(where);
-        psError(PXTOOLS_ERR_CONFIG, false, "search parameters (or -all) are required");
+        psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required");
         return false;
     }
     psFree(where);
 
-    if (faulted) {
-        // list only faulted rows
-        psStringAppend(&query, " %s", "AND chipProcessedImfile.fault != 0");
-    } else if (!allfiles) {
-        // don't list faulted rows
-        psStringAppend(&query, " %s", "AND chipProcessedImfile.fault = 0");
-    }
-
-    if (pstamp_order) {
-        // put runs in order of exposure id with newest chip Runs first
-        // The postage stamp parser depends on this behavior
-        psStringAppend(&query, "\nORDER by exp_id, chip_id DESC");
-    }
-
-    // treat limit == 0 as "no limit"
     if (limit) {
         psString limitString = psDBGenerateLimitSQL(limit);
@@ -687,5 +651,5 @@
 
     // negative simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "vpProcessedCell", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -696,5 +660,4 @@
 
     return true;
-#endif
 }
 
Index: /tags/ipp-20111110/ippconfig/recipes/filerules-split.mdc
===================================================================
--- /tags/ipp-20111110/ippconfig/recipes/filerules-split.mdc	(revision 32752)
+++ /tags/ipp-20111110/ippconfig/recipes/filerules-split.mdc	(revision 32753)
@@ -220,6 +220,5 @@
 
 #psvideophot
-PSVIDEOPHOT.OUTPUT           OUTPUT {OUTPUT}.{CHIP.NAME}.vid          OBJ NONE CHIP TRUE NONE
-PSVIDEOPHOT.CHIP             OUTPUT {OUTPUT}.{CHIP.NAME}.vid          OBJ NONE CHIP TRUE NONE
+PSVIDEOPHOT.OUTPUT           OUTPUT {OUTPUT}.vpt                      OBJ             NONE       CELL       TRUE      NONE
 
 # used by staticsky with single input
