Index: trunk/ppStack/src/ppStackCamera.c
===================================================================
--- trunk/ppStack/src/ppStackCamera.c	(revision 14470)
+++ trunk/ppStack/src/ppStackCamera.c	(revision 14520)
@@ -40,6 +40,6 @@
         psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weight map
 
-        float seeing = psMetadataLookupF32(NULL, input, "SEEING"); // Seeing FWHM
-        if (isnan(seeing)) {
+        float seeing = psMetadataLookupF32(&mdok, input, "SEEING"); // Seeing FWHM
+        if (!mdok || isnan(seeing) || seeing == 0.0) {
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SEEING of type F32", item->name);
             psFree(iter);
@@ -47,6 +47,6 @@
         }
 
-        float weighting = psMetadataLookupF32(NULL, input, "WEIGHTING"); // Relative weighting
-        if (isnan(weighting)) {
+        float weighting = psMetadataLookupF32(&mdok, input, "WEIGHTING"); // Relative weighting
+        if (!mdok || isnan(weighting) || weighting == 0.0) {
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks WEIGHTING of type F32", item->name);
             psFree(iter);
@@ -54,6 +54,6 @@
         }
 
-        float scale = psMetadataLookupF32(NULL, input, "SCALE"); // Relative scale
-        if (isnan(scale)) {
+        float scale = psMetadataLookupF32(&mdok, input, "SCALE"); // Relative scale
+        if (!mdok || isnan(scale) || scale == 0.0) {
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SCALE of type F32", item->name);
             psFree(iter);
Index: trunk/ppStack/src/ppStackReadout.c
===================================================================
--- trunk/ppStack/src/ppStackReadout.c	(revision 14470)
+++ trunk/ppStack/src/ppStackReadout.c	(revision 14520)
@@ -52,8 +52,21 @@
         psListAdd(cellList, PS_LIST_TAIL, ro->parent);
 
-        float seeing = psMetadataLookupF32(NULL, inputFile->fpa->analysis, "PPSTACK.SEEING"); // Seeing FWHM
-        float weighting = psMetadataLookupF32(NULL, inputFile->fpa->analysis,
+        bool mdok;                      // Status of MD lookup
+        float seeing = psMetadataLookupF32(&mdok, inputFile->fpa->analysis, "PPSTACK.SEEING"); // Seeing FWHM
+        if (!mdok || !isfinite(seeing)) {
+            psWarning("No SEEING supplied for image %d --- set to unity.", fileNum);
+            seeing = 1.0;
+        }
+        float weighting = psMetadataLookupF32(&mdok, inputFile->fpa->analysis,
                                               "PPSTACK.WEIGHTING"); // Relative weighting
-        float scale = psMetadataLookupF32(NULL, inputFile->fpa->analysis, "PPSTACK.SCALE"); // Rel. scale
+        if (!mdok || !isfinite(weighting)) {
+            psWarning("No WEIGHTING supplied for image %d --- set to unity.", fileNum);
+            weighting = 1.0;
+        }
+        float scale = psMetadataLookupF32(&mdok, inputFile->fpa->analysis, "PPSTACK.SCALE"); // Rel. scale
+        if (!mdok || !isfinite(scale)) {
+            psWarning("No SCALE supplied for image %d --- set to unity.", fileNum);
+            scale = 1.0;
+        }
 
         // Brain-dead background subtraction
@@ -69,4 +82,5 @@
             return false;
         }
+        psTrace("ppStack", 3, "Background for image %d is %f\n", fileNum, stats->robustMedian);
         (void)psBinaryOp(ro->image, ro->image, "-", psScalarAlloc(stats->robustMedian, PS_TYPE_F32));
 
