Index: branches/tap_branches/ppImage/src/ppImageParseCamera.c
===================================================================
--- branches/tap_branches/ppImage/src/ppImageParseCamera.c	(revision 25900)
+++ branches/tap_branches/ppImage/src/ppImageParseCamera.c	(revision 27838)
@@ -79,4 +79,14 @@
         int nScanRows = psMetadataLookupS32(&status, recipe, "SCAN.ROWS");
         pmDetrendSetThreadTasks(nScanRows);
+    }
+
+    if (options->doPatternRow || options->doPatternCell) {
+        pmFPAfile *outPattern = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.PATTERN");
+        if (!outPattern) {
+            psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.PATTERN"));
+            psFree(options);
+            return NULL;
+        }
+        outPattern->save = true;
     }
 
@@ -255,4 +265,7 @@
         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
