Index: /trunk/psphot/src/psphotSetNFrames.c
===================================================================
--- /trunk/psphot/src/psphotSetNFrames.c	(revision 37606)
+++ /trunk/psphot/src/psphotSetNFrames.c	(revision 37607)
@@ -45,8 +45,14 @@
 
     pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
-    psAssert (detections, "missing detections?");
-    psAssert (detections->allSources, "missing sources?");
+    if (!detections) {
+        psLogMsg ("psphot", PS_LOG_INFO, "No detections image input %d", index);
+        return true;
+    }
 
     psArray *sources = detections->allSources;
+    if (!sources) {
+        psLogMsg ("psphot", PS_LOG_INFO, "No sources for input %d", index);
+        return true;
+    }
 
     int col0 = expnum->col0;
