Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 32033)
+++ trunk/ippToPsps/jython/batch.py	(revision 32065)
@@ -41,6 +41,5 @@
                  id,
                  batchType, 
-                 fits, 
-                 survey=""): 
+                 fits): 
 
         self.everythingOK = False
@@ -62,8 +61,8 @@
         self.batchType = batchType;
         self.pspsVoTableFilePath = "../config/" + batchType + "/tables.vot"
-        self.survey = survey
-
-        # get dvo info from config
-        dvoName = self.doc.find("dvo/name").text
+
+        # get info from config
+        self.survey = self.doc.find("options/survey").text
+        self.pspsSurvey = self.doc.find("options/pspsSurvey").text
         dvoGpc1Label = self.doc.find("dvo/gpc1Label").text
         self.dvoLocation = self.doc.find("dvo/location").text
@@ -93,5 +92,5 @@
                 self.batchType, 
                 self.id,
-                survey,
+                self.survey,
                 dvoGpc1Label, 
                 self.datastore.product)
@@ -99,5 +98,5 @@
         # get local storage location from config
         self.batchName = "B%08d" % self.batchID
-        self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvoName
+        self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvoGpc1Label
         self.localOutPath = self.subDir + "/" + self.batchName 
         if not os.path.exists(self.localOutPath): os.makedirs(self.localOutPath)
@@ -115,6 +114,7 @@
         self.logger.infoPair("Survey", self.survey)
         self.logger.infoPair("Survey ID", "%d" % self.surveyID)
+        self.logger.infoPair("Publishing to PSPS as survey", self.pspsSurvey)
         self.logger.infoPair("DVO location", self.dvoLocation)
-        self.logger.infoPair("Use full DVO tables?", "%d" % self.useFullTables)
+        self.logger.infoBool("Use full DVO tables?", self.useFullTables)
 
         if self.fits:
@@ -172,6 +172,5 @@
         root.attrib['type'] = self.batchType
         root.attrib['timestamp'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
-        if self.survey != "":
-            root.attrib['survey'] = self.getBatchFriendlySurveyType()
+        if self.batchType != "IN": root.attrib['survey'] = self.pspsSurvey
         try: self.minObjID
         except: pass
@@ -237,21 +236,4 @@
         if self.datastore.publish(self.batchName, self.subDir, tarballFile, "tgz"):
             self.ippToPspsDb.updateLoadedToDatastore(self.batchID, 1)
-
-    '''
-    Gets PSPS-friendly survey type
-    '''
-    def getBatchFriendlySurveyType(self):
-
-        #return "SCR" # TODO
-        try:
-            self.survey
-        except:
-            return "NA" 
-
-        if self.survey == "3PI": return "3PI"
-        elif self.survey == "MD04": return "MD4"
-        else:
-            self.logger.error("Don't know this survey: '" + self.survey + "'")
-            return "NA"
 
     '''
