Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c	(revision 42224)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c	(revision 42225)
@@ -41,6 +41,11 @@
     if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE(FPCAMERA_ERR_DATA, "failed to load images at FPA level");
 
+    // count the number of sucesses and raise bad quality if none succeed
+    int nChipGood = 0;
+    int nChipTotal = 0;
+
     // load images at chip level (if appropriate) 
     while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
+	nChipTotal ++;
         psTrace ("fpcamera", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
         if (!chip->process || !chip->file_exists) { continue; }
@@ -68,5 +73,13 @@
 		psFree (psf);
 
-		if (!psphotForcedReadout (config, view, "FPCAMERA.INPUT")) ESCAPE(FPCAMERA_ERR_DATA, "failure in psphotForcedReadout");
+		if (!psphotForcedReadout (config, view, "FPCAMERA.INPUT")) {
+		    // This is likely a data quality issue, e.g. no stars on a chip
+		    // Do not raise an error, but do not add to count of good chips
+		    psErrorStackPrint(stderr, "Unable to perform photometry on image");
+		    psWarning("Unable to perform photometry on image --- suspect bad data quality.");
+		    psErrorClear();
+		    continue;
+		}
+		nChipGood ++;
 	    }
             // drop all versions of the internal files
@@ -80,4 +93,11 @@
     }
     if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE(FPCAMERA_ERR_IO, "failure in IOChecks(AFTER) at FPA");
+
+    if (!nChipGood) {
+	if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) {
+	    psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, "Unable to perform photometry on image", FPCAMERA_ERR_DATA);
+	}
+    }
+    psLogMsg("fpcamera", 3, "fpcameraAnalysis: %d of %d chips are good\n", nChipGood, nChipTotal);
 
     psFree (view);
