Index: trunk/ippToPsps/jython/sqlUtility.py
===================================================================
--- trunk/ippToPsps/jython/sqlUtility.py	(revision 39071)
+++ trunk/ippToPsps/jython/sqlUtility.py	(revision 39072)
@@ -18,5 +18,5 @@
         self.fields.append(str(field))
         self.values.append(str(value))
-        print "* " + str(field) + " = " + str(value)
+#       print "* " + str(field) + " = " + str(value)
         return
 
Index: trunk/ippToPsps/jython/stackbatch.py
===================================================================
--- trunk/ippToPsps/jython/stackbatch.py	(revision 39071)
+++ trunk/ippToPsps/jython/stackbatch.py	(revision 39072)
@@ -1086,13 +1086,17 @@
         for filter in self.filters:
             
+            stackImageID = self.stackIDs[filter]
+            if stackImageID < 1: continue
+    
             header = self.headerSet[filter]
 
-            stackImageID = self.stackIDs[filter]
-            if stackImageID == 0: continue
-    
             nInputs = self.getKeyInt(header, 0, 'NINPUTS')
 
-            for input in range(nInputs):
+            self.logger.debugPair("found NINPUTS", nInputs)
+
+            for input in range(int(nInputs)):
                 
+                self.logger.debugPair("trying input", str(input))
+
                 field = "INP_%04d" % input
                 inputName = self.getKeyValue(header, field)
@@ -1115,4 +1119,6 @@
                 airMass = self.getKeyFloat(header, "%6.3f", field)
                 
+                self.logger.debugPair("found header fields for", str(input))
+
                 sql = "INSERT INTO StackToFrame "
                 sql += " (stackImageID, frameID, scaleFactor, zp, expTime, airMass) VALUES ( "
