Index: trunk/ippToPsps/jython/forcedwarpbatch.py
===================================================================
--- trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 38945)
+++ trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 38951)
@@ -133,5 +133,5 @@
            self.logger.infoPair("found exp_id",     str(self.expID[num]))
            self.logger.infoPair("found exp_time",   str(self.expTime[num]))
-           self.logger.infoPair("found filter",     str(self.filterNam[num]))
+           self.logger.infoPair("found filter",     str(self.filterName[num]))
            self.logger.infoPair("found skycell_id", self.skycellName[num])
            self.logger.infoPair("found tess_id",    self.tessName[num])
@@ -216,15 +216,6 @@
        self.outputFitsPath = "%s/%s" % (self.localOutPath, self.outputFitsFile)
 
-
-
        # dump stuff to log
        self.logger.infoPair("add ID", "%d" % self.id)
-
-#       self.logger.infoPair("Exp ID", self.expID)
-
-
-
-
-
 
     '''
@@ -243,8 +234,10 @@
         self.logger.infoPair("found header","ok")
 
-        # photoCalID = str(self.scratchDb.getPhotoCalID(header['IMAGEID']))       
-
-        # XXX fix this:
-        photoCalID = GPC1.filtername.ForcedWarp
+        photoCalID = str(self.scratchDb.getPhotoCalID(header['IMAGEID']))       
+
+        # PHOTCODE and FILTER are not in the header; reconstruct here
+        # photoCalID = "GPC1.%s.ForcedWarp" % self.filterName[num][0]
+
+        zpImage = self.scratchDb.getImageZeroPoint(header['IMAGEID'])
 
         # XXX hard-wired platescale : 0.25
@@ -285,7 +278,9 @@
         # sqlLine.group("psfFwhm_max",    self.getKeyFloat(header, "%.8f", 'FW_MJ_UQ'))
 
-        # XXX: should psfTheta include the angle of the source chip in some way?
         sqlLine.group("psfTheta",       self.getKeyFloat(header, "%.8f", 'ANGLE'))
-        sqlLine.group("photoZero",      self.getKeyFloat(header, "%.8f", 'FPA.ZP'))
+
+        # sqlLine.group("photoZero",      self.getKeyFloat(header, "%.8f", 'FPA.ZP'))
+        sqlLine.group("photoZero",      zpImage)
+
         # photoColor -- how do I set this? it's also not set in stack meta
         sqlLine.group("ctype1",         self.getKeyValue(header, 'CTYPE1'));
