Index: trunk/ippToPsps/jython/forcedwarpbatch.py
===================================================================
--- trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 37577)
+++ trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 37592)
@@ -224,4 +224,6 @@
         self.generateRandomIDs()
 
+        self.generateUniquePspsIDs()
+           
         # add indexes ForcedWarpMeasurement
         self.scratchDb.createIndex("ForcedWarpMeasurement", "objID")
@@ -249,4 +251,6 @@
         self.tablesToExport.append("ForcedWarpExtended")
 
+           # get dvo ids, 
+        # add in the psps unique ids from stuff
 
     '''
@@ -326,5 +330,5 @@
 
     def generateRandomIDs(self):
-           sql = "UPDATE ForcedWarpMeasurement set randomWarpID = FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)";
+           sql = "UPDATE ForcedWarpMeasurement set randomWarpID = FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)"
         try: self.scratchDb.execute(sql)
         except:
@@ -333,5 +337,17 @@
 
 
-
+    '''
+    Updates table and generates pspsuniqueids
+    '''
+
+    def generatePspsUniqueIDs(self):
+        sql = "UPDATE ForcedWarpMeasurement join (select @r:=@r+1 rownum, objID from \
+        (select @r:=0) r, ForcedWarpMeasurement t) as foo using (objID) set \
+        uniquePspsFWid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
+        try: self.scratchDb.execute(sql)
+        except:
+           self.logger.errorPair('failed sql',sql)
+           return
+            
 
 
