Index: /trunk/ppStack/src/ppStackCombineInitial.c
===================================================================
--- /trunk/ppStack/src/ppStackCombineInitial.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackCombineInitial.c	(revision 26454)
@@ -20,4 +20,5 @@
     if (!options->convolve) {
         // No need to do initial combination when we haven't convolved
+	// XXX either allocate inspect and rejected here, or do not require them downstream
         return true;
     }
Index: /trunk/ppStack/src/ppStackConvolve.c
===================================================================
--- /trunk/ppStack/src/ppStackConvolve.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackConvolve.c	(revision 26454)
@@ -59,4 +59,10 @@
         pmFPAfileActivate(config->files, false, NULL);
         ppStackFileActivationSingle(config, PPSTACK_FILES_CONVOLVE, true, i);
+	if (options->convolve) {
+	    // XXX PPSTACK.CONV.KERNEL not defined unless convolve
+	    // pmFPAfileActivate(config->files, true, "PPSTACK.CONV.KERNEL");
+	    pmFPAfileActivateSingle(config->files, true, "PPSTACK.CONV.KERNEL", i); // Activated file
+	}
+
         pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT", i); // File of interest
         pmFPAview *view = ppStackFilesIterateDown(config);
Index: /trunk/ppStack/src/ppStackFiles.c
===================================================================
--- /trunk/ppStack/src/ppStackFiles.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackFiles.c	(revision 26454)
@@ -17,6 +17,7 @@
 
 /// Files required for the convolution
-static char *filesConvolve[] = { "PPSTACK.INPUT", "PPSTACK.INPUT.MASK", "PPSTACK.INPUT.VARIANCE",
-                                 "PPSTACK.CONV.KERNEL", NULL };
+static char *filesConvolve[] = { "PPSTACK.INPUT", "PPSTACK.INPUT.MASK", "PPSTACK.INPUT.VARIANCE", NULL };
+
+//                                 "PPSTACK.CONV.KERNEL", NULL };
 
 /// Output files for the combination
Index: /trunk/ppStack/src/ppStackMatch.c
===================================================================
--- /trunk/ppStack/src/ppStackMatch.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackMatch.c	(revision 26454)
@@ -344,4 +344,5 @@
                                                        footprint); // Filtered list of sources
 
+            bool oldThreads = pmReadoutFakeThreads(true); // Old threading state
             if (!pmReadoutFakeFromSources(fake, readout->image->numCols, readout->image->numRows,
                                           stampSources, SOURCE_MASK, NULL, NULL, options->psf,
@@ -353,4 +354,5 @@
                 return false;
             }
+            pmReadoutFakeThreads(oldThreads);
 
             fake->mask = psImageCopy(NULL, readout->mask, PS_TYPE_IMAGE_MASK);
Index: /trunk/ppStack/src/ppStackOptions.c
===================================================================
--- /trunk/ppStack/src/ppStackOptions.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackOptions.c	(revision 26454)
@@ -42,4 +42,5 @@
 
     options->convolve = true;
+    options->matchZPs = true;
     options->stats = NULL;
     options->statsFile = NULL;
Index: /trunk/ppStack/src/ppStackOptions.h
===================================================================
--- /trunk/ppStack/src/ppStackOptions.h	(revision 26453)
+++ /trunk/ppStack/src/ppStackOptions.h	(revision 26454)
@@ -9,4 +9,5 @@
     // Setup
     bool convolve;                      // Convolve images?
+    bool matchZPs;                      // Adjust relative fluxes based on transparency analysis?
     psMetadata *stats;                  // Statistics for output
     FILE *statsFile;                    // File to which to write statistics
Index: /trunk/ppStack/src/ppStackPrepare.c
===================================================================
--- /trunk/ppStack/src/ppStackPrepare.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackPrepare.c	(revision 26454)
@@ -176,17 +176,25 @@
 
 
-        pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Readout with sources
-        psArray *sources = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.SOURCES"); // Sources
-        if (!sources) {
-            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find sources in readout.");
-            return NULL;
-        }
-        options->sourceLists->data[index] = psMemIncrRefCounter(sources);
+	bool redoPhot = psMetadataLookupBool(NULL, recipe, "PHOT");
+	psArray *sources = NULL;
+
+	if (options->convolve || options->matchZPs || redoPhot) {
+	    pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Readout with sources
+	    sources = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.SOURCES"); // Sources
+	    if (!sources) {
+		psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find sources in readout.");
+		return NULL;
+	    }
+	    options->sourceLists->data[index] = psMemIncrRefCounter(sources);
+	}
 
         // Re-do photometry if we don't trust the source lists
-        if (psMetadataLookupBool(NULL, recipe, "PHOT")) {
+        if (redoPhot) {
             psTrace("ppStack", 2, "Photometering input %d of %d....\n", index, num);
             pmFPAfileActivate(config->files, false, NULL);
             ppStackFileActivationSingle(config, PPSTACK_FILES_CONVOLVE, true, index);
+	    if (options->convolve) {
+		pmFPAfileActivate(config->files, true, "PPSTACK.CONV.KERNEL");
+	    }
             pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT", index); // File
             pmFPAview *photView = ppStackFilesIterateDown(config);
Index: /trunk/ppStack/src/ppStackReadout.c
===================================================================
--- /trunk/ppStack/src/ppStackReadout.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackReadout.c	(revision 26454)
@@ -272,5 +272,5 @@
 
     if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskSuspect, maskBad, 0, iter, combineRej,
-                        combineSys, combineDiscard, useVariance, safe, true)) {
+                        combineSys, combineDiscard, useVariance, safe, rejected)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
         psFree(stack);
Index: /trunk/ppStack/src/ppStackSetup.c
===================================================================
--- /trunk/ppStack/src/ppStackSetup.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackSetup.c	(revision 26454)
@@ -21,4 +21,6 @@
     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
     psAssert(recipe, "We've thrown an error on this before.");
+
+    options->matchZPs = psMetadataLookupBool(NULL, recipe, "MATCH.ZERO.POINTS"); // Adjust zero points based on tranparency analysis?
 
     options->convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images?
Index: /trunk/ppStack/src/ppStackSources.c
===================================================================
--- /trunk/ppStack/src/ppStackSources.c	(revision 26453)
+++ /trunk/ppStack/src/ppStackSources.c	(revision 26454)
@@ -61,4 +61,15 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
+    if (!options->matchZPs) {
+	int num = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs
+	options->norm = psVectorAlloc(num, PS_TYPE_F32);
+	psVectorInit (options->norm, 0.0);
+
+	// XXX do I need to set this?
+	// options->sumExposure = sumExpTime;
+
+	return true;
+    }
+
     psArray *sourceLists = options->sourceLists; // Source lists for each input
     psVector *inputMask = options->inputMask; // Mask for inputs
