Index: branches/czw_branch/20110406/ippScripts/scripts/diff_skycell.pl
===================================================================
--- branches/czw_branch/20110406/ippScripts/scripts/diff_skycell.pl	(revision 31253)
+++ branches/czw_branch/20110406/ippScripts/scripts/diff_skycell.pl	(revision 31302)
@@ -265,4 +265,7 @@
 my $do_photom = 1;
 my $dump_config = 1; 
+if ($reduction eq 'NOCONVDIFF') {
+    $do_photom = 0;
+}
 if ($run_state eq 'new') {
     $configuration = prepare_output("PPSUB.CONFIG", $outroot, 1);
Index: branches/czw_branch/20110406/ippconfig/recipes/ppSub.config
===================================================================
--- branches/czw_branch/20110406/ippconfig/recipes/ppSub.config	(revision 31253)
+++ branches/czw_branch/20110406/ippconfig/recipes/ppSub.config	(revision 31302)
@@ -76,4 +76,6 @@
 INVERSE		BOOL	FALSE		# Generate inverse subtraction?
 PHOTOMETRY	BOOL	FALSE		# Perform photometry?
+NOCONVOLVE      BOOL    FALSE           # Skip convolution?
+
 
 FORCED.PHOTOMETRY.BOTH BOOL FALSE       # forced photometry on input sources?
@@ -141,4 +143,42 @@
  FORCED.PHOTOMETRY.BOTH BOOL    TRUE    # forced photometry on input sources
 END
+
+# Difference of warp - quickstack
+WARPQSTACK	METADATA
+	DUAL		BOOL	TRUE	# Dual convolution?
+	INVERSE		BOOL	FALSE	# Generate inverse subtraction?
+	PHOTOMETRY	BOOL	TRUE	# Perform photometry?
+
+	# penalty of 1.0
+	# DUAL convolution is more sensitive to the number of kernels
+	# do not provide as many orders as for SINGLE
+        # @ISIS.WIDTHS	F32	2.4  5.0  10.0  # Gaussian kernel FWHM values
+	@ISIS.WIDTHS	F32	1.5  3.0  6.0   # Gaussian kernel FWHM values
+	# @ISIS.WIDTHS	F32	2.0  3.0  5.0   # Gaussian kernel FWHM values
+        # @ISIS.WIDTHS	F32	2.1  4.2  8.4   # Gaussian kernel FWHM values
+	@ISIS.ORDERS	S32	2    2    2     # Polynomial orders for ISIS kernels
+
+	SCALE.REF	F32     5.0		# FWHM reference for kernel parameter scaling
+	KERNEL.SIZE     S32	15		# Kernel half-size (pixels)
+	STAMP.FOOTPRINT S32	15		# Size of stamps (pixels)
+END
+
+# Do no convolution
+UNCONVOLVED	METADATA
+	DUAL		BOOL	FALSE	# Dual convolution?
+	INVERSE		BOOL	FALSE   # Generate inverse subtraction?
+	PHOTOMETRY	BOOL	FALSE	# Perform photometry?
+	NOCONVOLVE      BOOL    TRUE
+	CONVOLVE.TARGET STR     SINGLE2	# convolution direction
+END
+
+# Difference of warp - junkstack
+WARPJSTACK      METADATA
+	DUAL		BOOL	FALSE	# Dual convolution?
+	INVERSE		BOOL	FALSE   # Generate inverse subtraction?
+	PHOTOMETRY	BOOL	TRUE	# Perform photometry?
+	CONVOLVE.TARGET STR     SINGLE1	# convolution direction
+END
+
 
 #PR image class
Index: branches/czw_branch/20110406/ippconfig/recipes/reductionClasses.mdc
===================================================================
--- branches/czw_branch/20110406/ippconfig/recipes/reductionClasses.mdc	(revision 31253)
+++ branches/czw_branch/20110406/ippconfig/recipes/reductionClasses.mdc	(revision 31302)
@@ -217,4 +217,18 @@
 END
 
+WARPQSTACK	METADATA
+	DIFF_PPSUB	STR	WARPQSTACK
+	DIFF_PSPHOT	STR	DIFF
+	JPEG_BIN1	STR	PPIMAGE_J1
+	JPEG_BIN2	STR	PPIMAGE_J2
+END
+
+NOCONVDIFF	METADATA
+	DIFF_PPSUB	STR	UNCONVOLVED
+	DIFF_PSPHOT	STR	DIFF
+	JPEG_BIN1	STR	PPIMAGE_J1
+	JPEG_BIN2	STR	PPIMAGE_J2
+END
+
 # reduction classes for different stacks
 # regular stacks
Index: branches/czw_branch/20110406/ppSub/src/ppSubDefineOutput.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubDefineOutput.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubDefineOutput.c	(revision 31302)
@@ -44,6 +44,21 @@
 
     // Convolved input images
-    pmReadout *inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout
-    pmReadout *refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout
+    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE);
+    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images.
+
+    pmReadout *inConv;
+    if (noConvolve) {
+      inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input readout
+    }
+    else {
+      inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout
+    }
+    pmReadout *refConv;
+    if (noConvolve) {
+      refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference readout
+    }
+    else {
+      refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout
+    }
     psFree(view);
 
@@ -60,5 +75,5 @@
         kernels = psMetadataLookupPtr(&mdok, analysis, PM_SUBTRACTION_ANALYSIS_KERNEL);
     }
-    if (!kernels) {
+    if (!kernels && !noConvolve) {
         psError(PPSUB_ERR_UNKNOWN, true, "Unable to find SUBTRACTION.KERNEL");
         psFree(outRO);
@@ -66,5 +81,7 @@
     }
     psAssert (hdu, "unable to find HDU");
-    psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description);
+    if (!noConvolve) {
+      psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description);
+    }
     outHDU->header = psMetadataCopy(outHDU->header, hdu->header);
 
Index: branches/czw_branch/20110406/ppSub/src/ppSubLoop.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubLoop.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubLoop.c	(revision 31302)
@@ -107,9 +107,16 @@
 
     // XXX if it exists, use the POS1, POS2 successs for the FWHMs
-    if (!ppSubMatchPSFs(data)) {
+    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE);
+    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images.
+    if (noConvolve) {
+      psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
+    } else {
+      if (!ppSubMatchPSFs(data)) {
         psError(psErrorCodeLast(), false, "Unable to match PSFs.");
         success = false;
         goto ESCAPE;
-    }
+      }
+    }
+
 
     if (data->quality) {
@@ -132,4 +139,5 @@
 
     // Close input files
+    if (!noConvolve) {
     if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) {
         psError(PPSUB_ERR_IO, false, "Unable to close input files.");
@@ -137,5 +145,5 @@
         goto ESCAPE;
     }
-
+    }
     if (!ppSubLowThreshold(data)) {
         psError(psErrorCodeLast(), false, "Unable to threshold images.");
@@ -157,4 +165,5 @@
     }
 
+    if (!noConvolve) {
     if (!data->quality && !ppSubMakePSF(data)) {
         psError(psErrorCodeLast(), false, "Unable to generate PSF.");
@@ -162,5 +171,5 @@
         goto ESCAPE;
     }
-
+    }
     // Now we've got a PSF, blow away detections in case they're confused with real output detections
     {
@@ -187,5 +196,12 @@
     }
     // dumpout(config, "diff.2a.fits");
-
+    if (noConvolve) {
+      if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) {
+	psError(PPSUB_ERR_IO, false, "Unable to close input files.");
+	success = false;
+	goto ESCAPE;
+      }
+    }
+    
     // Higher order background subtraction using psphot
     if (!ppSubBackground(config)) {
Index: branches/czw_branch/20110406/ppSub/src/ppSubMakePSF.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubMakePSF.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubMakePSF.c	(revision 31302)
@@ -37,15 +37,32 @@
 
     bool reverse = psMetadataLookupBool(NULL, config->arguments, "REVERSE"); // Reverse sense of subtraction?
-
+    
     bool mdok = false;                  // Status of MD lookup
     pmReadout *minuend = NULL;          // Image that will be positive following subtraction
     pmFPAfile *minuendFile = NULL;      // File for minuend image
     pmFPAview *view = ppSubViewReadout(); // View to readout
-    if (reverse) {
+
+    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSUB_RECIPE); // Recipe for ppSub
+    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
+
+    if (!noConvolve) {
+      printf("Using Convolved images because NOCONVOLVE is FALSE\n");
+      if (reverse) {
         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
-        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV");
-    } else {
+	minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV");
+      } else {
         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
-        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV");
+	minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV");
+      }
+    }
+    else {
+      psWarning("Not using Convolved images because NOCONVOLVE  is TRUE\n");
+      if (reverse) {
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
+	minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF");
+      } else {
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
+	minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT");
+      }
     }
 
Index: branches/czw_branch/20110406/ppSub/src/ppSubReadoutPhotometry.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubReadoutPhotometry.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubReadoutPhotometry.c	(revision 31302)
@@ -60,4 +60,5 @@
     // grab the PSF information from the pmFPAfile PSPHOT.PSF.LOAD
     pmFPAfile *psfFile = psMetadataLookupPtr(&mdok, config->files, "PSPHOT.PSF.LOAD"); // PSF file
+
     ppSubCopyPSF (photFile, psfFile, view);
 
Index: branches/czw_branch/20110406/ppSub/src/ppSubReadoutSubtract.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubReadoutSubtract.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubReadoutSubtract.c	(revision 31302)
@@ -31,4 +31,5 @@
 
     bool reverse = psMetadataLookupBool(&mdok, config->arguments, "REVERSE"); // Reverse sense of subtraction?
+    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
     bool addPair = psMetadataLookupBool(&mdok, recipe, "ADD.NOT.SUBTRACT"); // add instead of subtracting
 
@@ -38,10 +39,23 @@
     pmReadout *minuend = NULL;          // Positive image
     pmReadout *subtrahend = NULL;       // Negative image
-    if (reverse) {
+    if (!noConvolve) {
+      printf("Using Convolved images because NOCONVOLVE is FALSE\n");
+      if (reverse) {
         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
         subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
-    } else {
+      } else {
         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
         subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
+      }
+    }
+    else {
+      psWarning("Not using Convolved images because NOCONVOLVE  is TRUE\n");
+      if (reverse) {
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
+        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
+      } else {
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
+        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
+      }
     }
 
Index: branches/czw_branch/20110406/ppSub/src/ppSubThreshold.c
===================================================================
--- branches/czw_branch/20110406/ppSub/src/ppSubThreshold.c	(revision 31253)
+++ branches/czw_branch/20110406/ppSub/src/ppSubThreshold.c	(revision 31302)
@@ -95,5 +95,13 @@
 
     // Input images
-    pmReadout *in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image
+    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE");
+
+    pmReadout *in;
+    if (noConvolve) {
+      in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input image
+    }
+    else {
+      in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image
+    }
     if (!in) {
         psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
@@ -102,5 +110,11 @@
     }
 
-    pmReadout *ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image
+    pmReadout *ref;
+    if (noConvolve) {
+      ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference image
+    }
+    else {
+      ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image
+    }
     if (!ref) {
         psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
