Index: /branches/eam_branches/ipp-pstamp-20260421/psModules/src/detrend/pmShutterCorrection.c
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/psModules/src/detrend/pmShutterCorrection.c	(revision 43056)
+++ /branches/eam_branches/ipp-pstamp-20260421/psModules/src/detrend/pmShutterCorrection.c	(revision 43057)
@@ -1009,4 +1009,8 @@
         // use the sorted exptime, counts, and errors for the measurements
         pmShutterCorrection *guess = pmShutterCorrectionGuess(newtimes, newcounts); // Guess at correction
+	if (!guess) {
+	  psError(PS_ERR_UNKNOWN, true, "Unable to measure correction.\n");
+	  return NAN;
+	}
         psTrace("psModules.detrend", 5, "Shutter correction guess: scale: %f, offset: %f, offref: %f\n", guess->scale, guess->offset, guess->offref);
 
@@ -1034,5 +1038,5 @@
     if (numGood == 0) {
         psError(PS_ERR_UNKNOWN, true, "Unable to measure mean reference offset.\n");
-        return false;
+        return NAN;
     }
     meanRef /= (float)numGood;
