Index: trunk/ippToPsps/jython/diffbatch.py
===================================================================
--- trunk/ippToPsps/jython/diffbatch.py	(revision 39049)
+++ trunk/ippToPsps/jython/diffbatch.py	(revision 39071)
@@ -84,5 +84,9 @@
        self.projectionID ={}
        self.expID ={}
-
+       self.psfModelID = {}
+       self.psfFWHM = {}
+       self.psfFwhmMajor = {}
+       self.psfFwhmMinor = {}
+       
        # number is special - it is simply a list of diff skyfile IDs, used for
        # looping over things
@@ -168,4 +172,15 @@
            self.md5sum[num] = self.posFits[num].getMd5sum()
 
+           ## MEH adding psfFWHM info from header
+           ## -- XXX hard-wired platescale : 0.25
+           pltscale = 0.25
+           self.psfFwhmMajor[num] = pltscale * self.getKeyFloat(self.header[num], "%.8f", 'FWHM_MAJ')
+           self.psfFwhmMinor[num] = pltscale * self.getKeyFloat(self.header[num], "%.8f", 'FWHM_MIN')
+           self.psfFWHM[num] = 0.5*(self.psfFwhmMajor[num] + self.psfFwhmMinor[num])
+
+           self.psfmodel_name[num]    = self.getKeyValue(self.header[num], 'PSFMODEL')
+           self.psfmodelID[num]  = self.scratchDb.getFitModelID(self.psfmodel_name[num])
+
+
            # drop the existing tables    
 
@@ -218,6 +233,4 @@
         sqlLine.group("negImageID",            self.negImageID[num]);
         sqlLine.group("ippDiffID",             self.ippDiffID[num]);
-
-	## MEH adding projectionID -- want str for pre-0 in both? 
 	sqlLine.group("projectionID",          str(self.projectionID[num]))
         sqlLine.group("skycellID",             str(self.skycellID[num]))
@@ -226,4 +239,15 @@
 	sqlLine.group("md5sum",                str(self.md5sum[num]))
         sqlLine.group("expTime",               self.expTime[num]);
+        sqlLine.group("psfModelID",            self.psfmodelID[num])
+        sqlLine.group("psfFWHM",               self.psfFWHM[num])
+        sqlLine.group("psfWidMajor",           self.psfFwhmMajor[num])
+        sqlLine.group("psfWidMinor",           self.psfFwhmMinor[num])
+        sqlLine.group("psfTheta",              self.getKeyFloat(header, "%.8f", 'ANGLE'))
+        sqlLine.group("numStamps",             self.getKeyValue(self.header[num], 'SUBTRACTION.STAMPS'))
+        sqlLine.group("stampDevMean",          self.getKeyFloat(self.header[num], "%.8e", 'SUBTRACTION.DEV.MEAN'))
+        sqlLine.group("stampDevRMS",           self.getKeyFloat(self.header[num], "%.8e", 'SUBTRACTION.DEV.RMS'))
+        sqlLine.group("normalization",         self.getKeyFloat(self.header[num], "%.8e", 'SUBTRACTION.NORM'))
+        sqlLine.group("convolveMax",           self.getKeyFloat(self.header[num], "%.8e", 'SUBTRACTION.CONV.MAX'))
+        sqlLine.group("deconvolveMax",         self.getKeyFloat(self.header[num], "%.8e", 'SUBTRACTION.DECONV.MAX'))
         sqlLine.group("ctype1",                self.getKeyValue(self.header[num], 'CTYPE1'));
         sqlLine.group("ctype2",                self.getKeyValue(self.header[num], 'CTYPE2'));
