Index: branches/meh_branches/ppstack_test/psvideophot/src/Makefile.am
===================================================================
--- branches/meh_branches/ppstack_test/psvideophot/src/Makefile.am	(revision 32133)
+++ branches/meh_branches/ppstack_test/psvideophot/src/Makefile.am	(revision 33415)
@@ -1,3 +1,4 @@
-bin_PROGRAMS = psvideophot
+bin_PROGRAMS =  psvideophot \
+		dumpvideo
 
 noinst_HEADERS = \
@@ -40,4 +41,9 @@
 	psvideophotVersion.c
 
+dumpvideo_CFLAGS = $(PSVIDEOPHOT_CFLAGS) $(PPSTATS_CFLAGS) $(PSASTRO_CFLAGS) $(PSPHOT_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS)
+dumpvideo_LDFLAGS = $(PSVIDEOPHOT_LIBS) $(PSASTRO_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS)
+dumpvideo_SOURCES = \
+	dumpvideo.c
+
 CLEANFILES = *~
 
Index: branches/meh_branches/ppstack_test/psvideophot/src/dumpvideo.c
===================================================================
--- branches/meh_branches/ppstack_test/psvideophot/src/dumpvideo.c	(revision 33415)
+++ branches/meh_branches/ppstack_test/psvideophot/src/dumpvideo.c	(revision 33415)
@@ -0,0 +1,75 @@
+#include <stdio.h>
+#include <assert.h>
+#include <pslib.h>
+#include <psmodules.h>
+
+int main (int argc, char **argv) {
+
+    if (argc < 4) {
+        fprintf (stderr, "USAGE: dumpvideo (input) (extname) (output) [-includetable]\n");
+	exit (2);
+    }
+
+    pmConfig *config = pmConfigRead(&argc, argv, NULL);
+    if (config == NULL) {
+        psErrorStackPrint(stderr, "Can't find site configuration!\n");
+        exit(EXIT_FAILURE);
+    }
+
+
+
+    char *input   = argv[1];      // Input file name
+    char *extname = argv[2];      // Extension of interest
+    char *output  = argv[3];      // Output file name
+
+    bool includetable = false;
+    if (argc > 4) {
+        includetable = true;
+    }
+
+    psString inputResolved = pmConfigConvertFilename(input, config, false, false);
+    psFits *infile = psFitsOpen (inputResolved, "r"); // Input file
+    if (!infile) {
+        fprintf (stderr, "Unable to open input file %s", input);
+        exit (PS_EXIT_DATA_ERROR);
+    }
+
+    psString outputResolved = pmConfigConvertFilename(output, config, true, true);
+    psFits *outfile = psFitsOpen (outputResolved, "w"); // Output file
+    if (!outfile) {
+        fprintf (stderr, "Unable to open output file %s", output);
+        exit(PS_EXIT_DATA_ERROR);
+    }
+
+    if (!psFitsMoveExtName (infile, extname)) {
+        fprintf (stderr, "Unable to find extname %s\n", extname);
+        exit(PS_EXIT_DATA_ERROR);
+    }
+
+    psMetadata *header = psFitsReadHeader (NULL, infile);
+
+    psRegion region = {0, 0, 0, 0};
+    psArray *cube = psFitsReadImageCube (infile, region);
+
+    psFitsWriteImageCube (outfile, header, cube, extname);
+
+    if (includetable) {
+        psString video_extname = NULL;
+        psStringAppend(&video_extname, "video_table_%s", extname);
+        if (!psFitsMoveExtName (infile, video_extname)) {
+            fprintf (stderr, "Unable to find extname %s\n", video_extname);
+            exit(PS_EXIT_DATA_ERROR);
+        }
+        psArray *table = psFitsReadTable(infile);
+        if (!psFitsWriteTable(outfile, NULL, table, video_extname)) {
+            fprintf (stderr, "Unable to write video table video_extname %s\n", video_extname);
+            exit(PS_EXIT_DATA_ERROR);
+        }
+    }
+
+    psFitsClose(infile);
+    psFitsClose(outfile);
+
+    return PS_EXIT_SUCCESS;
+}
+    
Index: branches/meh_branches/ppstack_test/psvideophot/src/psvideoLoop.c
===================================================================
--- branches/meh_branches/ppstack_test/psvideophot/src/psvideoLoop.c	(revision 32133)
+++ branches/meh_branches/ppstack_test/psvideophot/src/psvideoLoop.c	(revision 33415)
@@ -44,4 +44,7 @@
     }
 
+    psString class_id = psMetadataLookupStr(&status, config->arguments, "CLASS_ID");
+    psString cell_id = psMetadataLookupStr(&status, config->arguments, "CELL_ID");
+
 
     pmConfigCamerasCull(config, NULL);
@@ -56,13 +59,20 @@
     }
 
+    psArray *output = NULL;
+
     pmChip *chip;                       // Chip from FPA
     while ((chip = pmFPAviewNextChip(view, input->fpa, 1)) != NULL) {
         psLogMsg ("psvideophotLoop", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
+        psString chipName = psMetadataLookupStr(&status, chip->concepts, "CHIP.NAME");
+        if (strcmp(chipName, class_id)) {
+            continue;
+        }
         if (!chip->process || !chip->file_exists) {
-            continue;
+            ESCAPE("target chip has no data");
         }
         if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
             ESCAPE("load failure for Chip");
         }
+        (void) class_id;
 
         double threshold = THRESHOLD;
@@ -72,10 +82,16 @@
         while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {
             psLogMsg ("psvideophotLoop", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
+            psString cellName = psMetadataLookupStr(&status, cell->concepts, "CELL.NAME");
+            if (strcmp(cellName, cell_id)) {
+                continue;
+            }
             if (!cell->process || !cell->file_exists) {
-                continue;
+                ESCAPE("target cell has no data");
             }
             if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
                 ESCAPE("load failure for Cell");
             }
+
+	    psLogMsg("psvideophotLoop", 1, "Found target cell %s %d. %ld readouts\n", cellName, view->cell, cell->readouts->n);
 
             // Put version information into the header
@@ -87,9 +103,7 @@
 
             if (cell->readouts->n <2) {
-	      continue; 
+              psLogMsg("psvideophotLoop", 1, "cell %s has only %ld readouts\n", cellName, cell->readouts->n);
+              ESCAPE("invalid video Cell");
 	    }
-
-            psString cellName = psMetadataLookupStr(&status, cell->concepts, "CELL.NAME");
-	    psLogMsg("psvideophotLoop", 1, "Found video cell %s %d\n", cellName, view->cell);
 
             // get the position of this cell on the chip 
@@ -114,6 +128,8 @@
 
             // go find the video extension data
-            psString video_extension_name = NULL;
-            psStringAppend(&video_extension_name, "video_table_%s", cellName);
+            psString video_extension_name = psMetadataLookupStr(&status, config->arguments, "VIDEOEXTNAME");
+            if (!video_extension_name) {
+                psStringAppend(&video_extension_name, "video_table_%s", cellName);
+            }
             psArray *video_table = readVideoTable(input, video_extension_name);
             if (!video_table) {
@@ -121,5 +137,8 @@
                 ESCAPE("invalid image file");
             }
-            psMetadataAddArray(cell->analysis, PS_LIST_TAIL, "VIDEO_DATA", 0, "", video_table);
+            psFree(video_extension_name);
+            // psMetadataAddArray(cell->analysis, PS_LIST_TAIL, "VIDEO_DATA", 0, "", video_table);
+
+            output = (psArray *) psMemIncrRefCounter(video_table);
 
             if (cell->readouts->n != video_table->n) {
@@ -180,4 +199,5 @@
                 double cnpix2 = psMetadataLookupS32(&status, row, "cnpix2");
 
+                // avoid errors from unused variables
                 (void) frame_start; (void) frame_complete;
                 (void) rowpre; (void) cnpix1; (void) cnpix2; (void) fwhm_x; (void) fwhm_y; (void) fwhm;
@@ -191,8 +211,9 @@
                 double star_readout_y = (centroid_y - cnpix2) / yBin;
 
+#ifdef notdef
                 printf("%4d %9.2f %9.2f %9.2f %.1f %.1f %9.6f %6.3f %6.3f %6.3f\n",
                         frame, flux, snr, sky, star_readout_x, star_readout_y, frame_complete - frame_start,
                             fwhm, fwhm_x, fwhm_y);
-
+#endif
                 psStatsInit(stats);
 
@@ -206,19 +227,34 @@
                 double stddev = stats->sampleStdev;
                 double median = stats->sampleMedian;
+                double vpFlux = 0;
+                double vpSum = 0;
+                double xy[2] = {0, 0};
                 if (stddev > threshold) {
 
-                    double sum = 0;
-                    // XXX: use a point data type
-                    double xy[2];
-                    Centering(readout->image, EDGE, &sum, xy, median);
-                    double ourFlux;
-                    ourFlux = SubSum(readout->image, xy, median);
-
-                    printf("%4d %9.2f %9.2f %9.2f %.1f %.1f %9.2f\n",
-                             frame, ourFlux, ourFlux/stddev, median, xy[0], xy[1], stddev);
+                    Centering(readout->image, EDGE, &vpSum, xy, median);
+
+                    if (isfinite(xy[0]) && isfinite(xy[1])) {
+                        vpFlux = SubSum(readout->image, xy, median);
+                    }
+
+//                    printf("%4d %9.2f %9.2f %9.2f %.1f %.1f %9.2f\n",
+//                             frame, vpFlux, vpFlux/median, median, xy[0], xy[1], stddev);
                 } else {
-                    printf("%4d %9.2f %9.2f %8.2f\n",
-                            frame, 0.0,   stddev, median);
-                }
+//                    printf("%4d %9.2f %9.2f %8.2f\n",
+//                            frame, 0.0,   stddev, median);
+                }
+                if (frame % 60 == 0) {
+                    printf("frame  flux        sky       snr     X    Y     dt        fwhm   fwhm_x fwhm_y  vp_flux   vp_median vp_sum    vp_stddev vp_x vp_y\n");
+                }
+                printf("%4d   %9.2f %9.2f %9.2f %.1f %.1f %9.6f %6.3f %6.3f %6.3f   %9.2f %9.2f %9.2f %9.2f %.1f %.1f\n",
+                        frame, flux, sky, snr, star_readout_x, star_readout_y, frame_complete - frame_start,
+                            fwhm, fwhm_x, fwhm_y,
+                            vpFlux, median, vpSum, stddev, xy[0], xy[1]);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_flux", 0, "vp flux", vpFlux);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_median", 0, "vp meidan", median);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_stddev", 0, "vp meidan", stddev);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_sum", 0, "vp sum of source", vpSum);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_x", 0, "centroid x from vp", xy[0]);
+                psMetadataAddF32(row, PS_LIST_TAIL, "vp_y", 0, "centroid y from vp", xy[1]);
             }
             psLogMsg ("psvideophotLoop", 5, "Done processing video cell");
@@ -247,11 +283,22 @@
     psFree(view);
 
-    // Dump configuration
-    psString dump_file = psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
-    if (dump_file) {
-        if (!pmConfigDump(config, dump_file)) {
-            ESCAPE("Unable to dump configuration.");
-        }
-    }
+    psString outputName = psMetadataLookupStr(&status, config->arguments, "OUTPUT");
+    psString realName = pmConfigConvertFilename(outputName, config, true, true);
+    if (!realName) {
+        psError(PS_ERR_UNKNOWN, false, "failed to convert filename for %s", outputName);
+        ESCAPE("cannot save output");
+    }
+    psFits *outFits = psFitsOpen(realName, "w");
+    if (!outFits) {
+        psError(PS_ERR_UNKNOWN, false, "failed to open output filename for %s", outputName);
+        ESCAPE(" ");
+    }
+
+    psMetadata *outputHeader = lastHDU ? lastHDU->header : NULL;
+    if (!psFitsWriteTable(outFits, outputHeader, output, "videophotemetry")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to write videophotometry table");
+        ESCAPE("cannot write output");
+    }
+    psFitsClose(outFits);
 
     return true;
Index: branches/meh_branches/ppstack_test/psvideophot/src/psvideophotArguments.c
===================================================================
--- branches/meh_branches/ppstack_test/psvideophot/src/psvideophotArguments.c	(revision 32133)
+++ branches/meh_branches/ppstack_test/psvideophot/src/psvideophotArguments.c	(revision 33415)
@@ -6,24 +6,10 @@
 
 static void usage (void) {
-    fprintf(stderr, "USAGE: psvideophot [-file INPUT.fits] [-list INPUT.txt] OUTPUT\n\n");
+    fprintf(stderr, "USAGE: psvideophot [-file INPUT.fits] [-list INPUT.txt] OUTPUT -class_id CLASS_ID -cell_id CELL_ID\n\n");
     fprintf(stderr, "Optional arguments:\n");
     fprintf(stderr, "\t-stats STATS.mdc: Output statistics into STATS.mdc\n");
-    fprintf(stderr, "\t-isfringe: The input image contains fringe data.\n");
-    fprintf(stderr, "\t-isdark: The input image contains dark data.\n");
-    fprintf(stderr, "\t-usemask MASKVAL: Use this mask value (override recipe).\n");
-    fprintf(stderr, "\t-chip CHIPNUM: Only process this chip number.\n");
-    fprintf(stderr, "\t-norm VALUE: Divide through by this value when done.\n");
-    fprintf(stderr, "\t-normlist file.mdc: normalizations by class_id.\n");
-    fprintf(stderr, "\t-video: process video cells\n");
+    fprintf(stderr, "\t-video_extname VIDEOEXTNAME: EXTNAME for video table\n");
     fprintf(stderr, "\n");
     fprintf(stderr, "Input options (single file / file list):\n");
-    fprintf(stderr, "\t-noisemap/-noisemaplist: Noise Map image.\n");
-    fprintf(stderr, "\t-bias/-biaslist: Bias image.\n");
-    fprintf(stderr, "\t-dark/-darklist: Dark image.\n");
-    fprintf(stderr, "\t-shutter/-shutterlist: Shutter image.\n");
-    fprintf(stderr, "\t-flat/-flatlist: Flat image.\n");
-    fprintf(stderr, "\t-mask/-masklist: Mask image.\n");
-    fprintf(stderr, "\t-fringe/-fringelist: Fringe image and data.\n");
-    fprintf(stderr, "\t-linearity/-linearlist: linearity correction file.\n");
     fprintf(stderr, "\n");
     exit (2);
@@ -63,4 +49,29 @@
     // psMetadata *options = psMetadataAlloc ();
     // psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSVIDEOPHOT.OPTIONS",  PS_DATA_METADATA, "", options);
+
+    if ((argnum = psArgumentGet(argc, argv, "-class_id"))) {
+        psArgumentRemove(argnum, &argc, argv);
+        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "CLASS_ID", PS_META_REPLACE,
+                         "Chip to process", argv[argnum]);
+        psArgumentRemove(argnum, &argc, argv);
+    } else {
+        fprintf(stderr, "-class_id is required\n");
+        usage();
+    }
+    if ((argnum = psArgumentGet(argc, argv, "-cell_id"))) {
+        psArgumentRemove(argnum, &argc, argv);
+        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "CELL_ID", PS_META_REPLACE,
+                         "Cell to process", argv[argnum]);
+        psArgumentRemove(argnum, &argc, argv);
+    } else {
+        fprintf(stderr, "-cell_id is required\n");
+        usage();
+    }
+    if ((argnum = psArgumentGet(argc, argv, "-video_extname"))) {
+        psArgumentRemove(argnum, &argc, argv);
+        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "VIDEOEXTNAME", PS_META_REPLACE,
+                         "EXTNAME of video table", argv[argnum]);
+        psArgumentRemove(argnum, &argc, argv);
+    }
 
     if ((argnum = psArgumentGet(argc, argv, "-stats"))) {
@@ -117,4 +128,5 @@
     // the input file is a required argument; if not found, we will exit
     pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list");
+    pmConfigFileSetsMD (config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist");
 
     // if these command-line options are supplied, load the file name lists into config->arguments
@@ -168,5 +180,5 @@
 
     // Add the input and output images (which remain on the command-line) to the arguments list
-    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[1]);
+    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output table", argv[1]);
 
     return config;
Index: branches/meh_branches/ppstack_test/psvideophot/src/psvideophotParseCamera.c
===================================================================
--- branches/meh_branches/ppstack_test/psvideophot/src/psvideophotParseCamera.c	(revision 32133)
+++ branches/meh_branches/ppstack_test/psvideophot/src/psvideophotParseCamera.c	(revision 33415)
@@ -7,6 +7,4 @@
 psvideophotOptions *psvideophotParseCamera(pmConfig *config)
 {
-    bool status = false;
-
     if (!psvideophotDefineFile(config, NULL, "PSVIDEOPHOT.INPUT", "INPUT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_NONE)) {
         psError(PS_ERR_IO, false, "Can't find an input image source");
@@ -16,155 +14,13 @@
     psAssert(input, "We just put it there!");
 
+#ifdef notyet
     // add recipe options supplied on command line
+    bool status = false;
     psMetadata *recipe  = psMetadataLookupPtr(&status, config->recipes, RECIPE_NAME);
+#endif
 
     // parse the options from the metadata format to the psvideophotOptions structure
     psvideophotOptions *options = psvideophotOptionsParse(config);
 
-    // the following are defined from the argument list, if given,
-    // otherwise they revert to the config information
-    // not all input or output images are used in a given recipe
-    
-    int nThreads = psMetadataLookupS32(&status, config->arguments, "NTHREADS");
-    if (nThreads > 0) {
-        int nScanRows = psMetadataLookupS32(&status, recipe, "SCAN.ROWS");
-        pmDetrendSetThreadTasks(nScanRows);
-    }
-
-    // the following files are output targets
-    pmFPAfile *outImage = pmFPAfileDefineOutput(config, input->fpa, "PSVIDEOPHOT.OUTPUT");
-    if (!outImage) {
-        psError(PS_ERR_IO, false, _("Unable to generate output file from PSVIDEOPHOT.OUTPUT"));
-        psFree(options);
-        return NULL;
-    }
-    if (outImage->type != PM_FPA_FILE_OBJ) {
-        psError(PS_ERR_IO, true, "PSVIDEOPHOT.OUTPUT is not of type OBJ");
-        psFree(options);
-        return NULL;
-    }
-    
-    // XXX should these be bound explicitly to the outImage->fpa rather than the input->fpa?
-    pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PSVIDEOPHOT.CHIP");
-    if (!chipImage) {
-        psError(PS_ERR_IO, false, _("Unable to generate new file from PSVIDEOPHOT.CHIP"));
-        psFree(options);
-        return NULL;
-    }
-    if (chipImage->type != PM_FPA_FILE_OBJ) {
-        psError(PS_ERR_IO, true, "PSVIDEOPHOT.CHIP is not of type OBJ");
-        psFree(options);
-        return NULL;
-    }
-    
-
-    // chipImage    -> psphotInput  (pmFPAfileDefineFromFile)       : fpa is constructed
-    // psphotInput  -> psphotOutput (pmFPAfileDefineOutputFromFile) : fpa is equated
-    // psphotOutput -> psastroInput (pmFPAfileDefineInput)          : fpa is ref-copied
-    // psastroInput -> psastroModel (pmFPAfileDefineFromArgs        : fpa is ref-copied
-    // psastroInput -> psastroModel (pmFPAfileDefineFromConf        : fpa is constructed
-    // psastroInput -> psastroModel (pmFPAfileDefineFromDetDB       : fpa is constructed (pmDetrendSelect uses input concepts )
-
-    // For photometry, we operate on the chip-mosaicked image
-    // we create a copy of the mosaicked image for psphot so we can write out a clean image
-    
-
-        // this file is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by
-        // psphotDefineFiles
-        pmFPAfile *psphotInput = pmFPAfileDefineFromFile (config, chipImage, 1, 1, "PSPHOT.INPUT");
-        PS_ASSERT (psphotInput, false);
-
-        // specify the number of psphot input images
-        psMetadataAddS32 (config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "number of inputs", 1);
-
-        // define associated psphot input/output files
-        if (!psphotDefineFiles (config, psphotInput)) {
-            psError(PSPHOT_ERR_CONFIG, false,
-                    "Trouble defining the additional input/output files for psphot");
-            return false;
-        }
-    
-
-    // For photometry, we operate on the chip-mosaicked image
-    
-
-    // save any of these files?
-    outImage->save   = options->BaseFITS;
-    
-
-    chipImage->save  = options->ChipFITS;
-    
-
-    
-    // outImage is used as a carrier: input to chipImage -> require the data to remain at the CHIP level
-    outImage->freeLevel = PS_MIN(outImage->freeLevel, PM_FPA_LEVEL_CHIP);
-    outImage->dataLevel = outImage->freeLevel;
-    outImage->fileLevel = PS_MIN(outImage->fileLevel, outImage->dataLevel);
-
-    // outMask and outVariance must be freed at the same level as outImage (all freed by pmFPAFreeData)
-    
-
-    // the input data is the same as the outImage data : force the free levels to match
-    input->freeLevel = PS_MIN(outImage->freeLevel, input->freeLevel);
-
-    // define the binned target files (which may just be carriers for some camera configurations)
-    
-    // Chip selection: turn on only the chips specified (pass status to suppress missing-key log msg)
-    char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS");
-    psArray *chips = psStringSplitArray(chipLine, ",", false);
-    if (chips->n > 0) {
-        pmFPASelectChip (input->fpa, -1, true); // deselect all chips
-        for (int i = 0; i < chips->n; i++) {
-            int chipNum = atoi(chips->data[i]);
-            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
-                psError(PS_ERR_IO, false, "Chip number %d doesn't exist in camera.\n", chipNum);
-                psFree(options);
-                return false;
-            }
-        }
-    }
-    psFree (chips);
-
-    if (psMetadataLookupBool(NULL, config->arguments, "INPUT_IS_FRINGE")) {
-        // It's a fringe file, so change the file type
-        input->type = PM_FPA_FILE_FRINGE;
-        outImage->type = PM_FPA_FILE_FRINGE;
-    }
-    if (psMetadataLookupBool(NULL, config->arguments, "INPUT_IS_DARK")) {
-        // It's a dark file, so change the file type
-        input->type = PM_FPA_FILE_DARK;
-        outImage->type = PM_FPA_FILE_DARK;
-        // Turn off compression --- there are just too many nasties that can happen
-        psFree(outImage->compression);
-        outImage->compression = NULL;
-        psFree(outImage->options);
-        outImage->options = NULL;
-    }
-
-    // Turn off mask and variance output if we're not doing anything interesting
-    
-    if (psTraceGetLevel("psvideophot.config") > 0) {
-        // Get a look inside all the files.
-        psMetadataIterator *filesIter = psMetadataIteratorAlloc(config->files, PS_LIST_HEAD, NULL);
-        psMetadataItem *item;               // Item from iteration
-        fprintf(stderr, "Files:\n");
-        while ((item = psMetadataGetAndIncrement(filesIter))) {
-            pmFPAfile *file = item->data.V; // File of interest
-            fprintf(stderr, "%s: %p %p %p (%p) %p\n", file->name,
-                    file->src, file->fpa,
-                    file->camera, file->fpa->camera, file->format);
-        }
-        psFree(filesIter);
-    }
-
-    // Change the input dark type between the old (IMAGE) and new (multi-DARK).
-    // Hopefully this is a temporary change until we all move over to using the new dark types
-    bool mdok;                          // Status of MD lookup
-    if (options->doDark && psMetadataLookupBool(&mdok, recipe, "OLDDARK")) {
-        pmFPAfile *dark = psMetadataLookupPtr(NULL, config->files, "PSVIDEOPHOT.DARK");
-        assert(dark);
-        dark->type = PM_FPA_FILE_IMAGE;
-    }
-
     return (options);
 }
