Index: /trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- /trunk/ippToPsps/jython/detectionbatch.py	(revision 38806)
+++ /trunk/ippToPsps/jython/detectionbatch.py	(revision 38807)
@@ -242,6 +242,9 @@
         sqlLine.group("detrend2",         self.getKeyValue(header, 'DETREND.DARK'))
         sqlLine.group("detrend3",         self.getKeyValue(header, 'DETREND.FLAT'))
-        sqlLine.group("detrend4",         self.getKeyValue(header, 'DETREND.FRINGE'))
     #what happens if it can't find it?
+        # CZW: I think this should properly trap the fringe
+        if self.getKeyValue(header, 'DETREND.FRINGE') != "NULL":
+            sqlLine.group("detrend4",         self.getKeyValue(header, 'DETREND.FRINGE'))
+
         sqlLine.group("detrend5",         self.getKeyValue(header, 'DETREND.NOISEMAP'))
         sqlLine.group("detrend6",         self.getKeyValue(header, 'DETREND.NONLIN'))
