Index: trunk/psModules/src/objects/pmPSFtryModel.c
===================================================================
--- trunk/psModules/src/objects/pmPSFtryModel.c	(revision 30031)
+++ trunk/psModules/src/objects/pmPSFtryModel.c	(revision 30621)
@@ -52,4 +52,23 @@
 // mask values indicate the reason the source was rejected:
 
+// XXX some test code (delete eventually)
+// bool countMaskedSources(pmPSFtry *try, char *msg) {
+// 
+//     int N1 = 0;
+//     int N2 = 0;
+//     for (int i = 0; i < try->sources->n; i++) {
+//         pmSource *source = try->sources->data[i];
+//     	// fprintf (stderr, "%llx : %d\n", (long long int) source, (source->mode & PM_SOURCE_MODE_PSFSTAR));
+//     	if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
+//     	    N1 ++;
+//         }
+//     	if (try->mask->data.PS_TYPE_VECTOR_MASK_DATA[i]) {
+//     	    N2 ++;
+//         }
+//     }
+//     fprintf (stderr, "%s : masked: %d or %d of %ld\n", msg, N1, N2, try->sources->n);
+//     return true;
+// }
+
 // generate a pmPSFtry with a copy of the test PSF sources
 pmPSFtry *pmPSFtryModel (const psArray *sources, const char *modelName, pmPSFOptions *options, psImageMaskType maskVal, psImageMaskType markVal)
@@ -203,4 +222,5 @@
             chisq->data.F32[i] = 0.0;
             mask->data.PS_TYPE_VECTOR_MASK_DATA[i] = 0xff;
+            psTrace ("psModules.objects", 4, "dropping %d (%d,%d) : no PSF model\n", i, source->peak->x, source->peak->y);
         } else {
             flux->data.F32[i] = source->modelPSF->params->data.F32[PM_PAR_I0];
