Index: trunk/psphot/src/psphotAddNoise.c
===================================================================
--- trunk/psphot/src/psphotAddNoise.c	(revision 20586)
+++ trunk/psphot/src/psphotAddNoise.c	(revision 20593)
@@ -41,6 +41,7 @@
     float GAIN = psMetadataLookupF32(&status, readout->parent->concepts, "CELL.GAIN"); // Cell gain
     PS_ASSERT (status, false);
-
-    FACTOR /= GAIN;
+    if (isfinite(GAIN)) {
+	FACTOR /= GAIN;
+    }
 
     // loop over all source
