Index: trunk/ippToPsps/jython/stackbatch.py
===================================================================
--- trunk/ippToPsps/jython/stackbatch.py	(revision 32500)
+++ trunk/ippToPsps/jython/stackbatch.py	(revision 32501)
@@ -57,10 +57,13 @@
        self.filter = meta[0];
        self.filter = self.filter[0:1]
+
+       # skycell is, eg "skycell.1133.081"
+       # we need 1133.081 for skycell, but store as an int, so instead store 1133081
+       # projection cell is just the 1133 bit
        self.skycell = meta[1];
-       print self.skycell
-       # TODO HACK fix this
-       self.skycell = self.skycell[8:12]
-       # mangling e.g. 0683.043 into 0683043 for now until we have a schema change
-       #self.skycell = self.skycell.replace(".", "")
+       self.projectioncell = self.skycell[8:12]
+       self.skycell = self.skycell[8:]
+       self.skycell = self.skycell.replace(".", "")
+
        self.analysisVer = meta[2];
 
@@ -102,4 +105,5 @@
        self.logger.infoPair("Stack type", "%s" % self.stackType)
        self.logger.infoPair("Skycell", "%s" % self.skycell)
+       self.logger.infoPair("Projectioncell", "%s" % self.projectioncell)
        self.logger.infoPair("Filter", "%s" % self.filter)
 
@@ -305,4 +309,5 @@
                ippDetectID \
                ,skyCellID \
+               ,projectionCellID \
                ,obsTime \
                ,xPos \
@@ -343,4 +348,5 @@
                IPP_IDET \
                ," + self.skycell + " \
+               ," + self.projectioncell + " \
                ," + self.header['MJD-OBS'] + " \
                ,X_PSF \
