Index: trunk/ippToPsps/jython/dvo.py
===================================================================
--- trunk/ippToPsps/jython/dvo.py	(revision 33234)
+++ trunk/ippToPsps/jython/dvo.py	(revision 33259)
@@ -16,5 +16,4 @@
 from java.lang import *
 from java.sql import *
-from xml.etree.ElementTree import ElementTree, Element, tostring
 
 
@@ -35,17 +34,16 @@
 
     '''
-    def __init__(self, logger, doc):
+    def __init__(self, logger, config):
 
         # set up logging
         self.logger = logger
-        self.doc = doc
+        self.config = config
         self.logger.infoSeparator()
-        self.dvoLocation = self.doc.find("dvo/location").text
 
         # create database object
-        self.scratchDb = ScratchDb(logger, self.doc, 1)
+        self.scratchDb = ScratchDb(logger, self.config, 1)
 
         # or decide if we are using the right DVO
-        self.correctDvo = self.scratchDb.isCorrectDvo(self.dvoLocation)
+        self.correctDvo = self.scratchDb.isCorrectDvo(self.config.dvoLocation)
 
         # set up empty lists
@@ -57,7 +55,8 @@
 
         if not self.correctDvo:
-            response = raw_input("* Wrong DVO is use. Do you want to reset and use '" + self.dvoLocation + "' instead (y/n)? ")
+            print "*******************************************************************************"
+            response = raw_input("**** Wrong DVO in use. Do you want to reset and use '" + self.config.dvoLocation + "' instead (y/n)? ")
             if response == "y":
-                response = raw_input("* Are you ABSOLUTELY sure you want to do this? (y/n)? ")
+                response = raw_input("**** Are you ABSOLUTELY sure you want to do this? (y/n)? ")
                 if response == "y":
                     self.resetAllTables()
@@ -101,5 +100,5 @@
 
         # check if we have up-to-date version
-        path = self.dvoLocation + "/Images.dat"
+        path = self.config.dvoLocation + "/Images.dat"
         if self.scratchDb.alreadyImportedThisDvoTable(path): 
             self.logger.infoPair("DVO Images.dat file", "up-to-date")
@@ -156,5 +155,5 @@
         if not self.correctDvo: return
 
-        path =  self.dvoLocation + "/SkyTable.fits"
+        path =  self.config.dvoLocation + "/SkyTable.fits"
         if self.scratchDb.alreadyImportedThisDvoTable(path): 
             self.logger.infoPair("DVO SkyTable.fits file", "up-to-date")        
@@ -173,5 +172,5 @@
         
         self.scratchDb.setImportedThisDvoTable(path)
-        self.logger.infoPair("Finished importing SkyTable at", self.dvoLocation)
+        self.logger.infoPair("Finished importing SkyTable at", self.config.dvoLocation)
 
     '''
@@ -181,4 +180,5 @@
 
         halfSide = side/2.0
+        print "%f %f %f" % (ra, dec, side)
         self.setSkyArea(ra-halfSide, ra+halfSide, dec-halfSide, dec+halfSide)
     
@@ -208,5 +208,5 @@
 
         # reset all lists
-        allRegions = self.scratchDb.getDvoRegionsForThisBox(minRa, maxRa, minDec, maxDec)
+        allRegions = self.scratchDb.getDvoRegions(minRa, maxRa, minDec, maxDec)
         allIngestedRegions = self.scratchDb.getIngestedDvoRegions()
         self.regionsToIngest = []
@@ -219,6 +219,6 @@
         for region in allRegions:
 
-           cpmPath = self.dvoLocation + "/" + region + ".cpm"
-           cptPath = self.dvoLocation + "/" + region + ".cpt"
+           cpmPath = self.config.dvoLocation + "/" + region + ".cpm"
+           cptPath = self.config.dvoLocation + "/" + region + ".cpt"
 
            # check for existence of cpm and cpt files
@@ -262,5 +262,5 @@
         # go no further if we've already partly ingested a different DVO
         if not self.correctDvo:
-            self.logger.infoPair("Wrong DVO in use", self.dvoLocation)
+            self.logger.infoPair("Wrong DVO in use", self.config.dvoLocation)
             return
 
@@ -327,6 +327,6 @@
 
             # get combined size of cpm and cpt files
-            size = size + self.getDiskSize(self.dvoLocation + "/" + region + ".cpm")
-            size = size + self.getDiskSize(self.dvoLocation + "/" + region + ".cpt")
+            size = size + self.getDiskSize(self.config.dvoLocation + "/" + region + ".cpm")
+            size = size + self.getDiskSize(self.config.dvoLocation + "/" + region + ".cpt")
 
         return size
@@ -357,6 +357,6 @@
         for region in self.regionsToIngest:
 
-           cpmPath = self.dvoLocation + "/" + region + ".cpm"
-           cptPath = self.dvoLocation + "/" + region + ".cpt"
+           cpmPath = self.config.dvoLocation + "/" + region + ".cpm"
+           cptPath = self.config.dvoLocation + "/" + region + ".cpt"
 
            cpmTableName = self.scratchDb.getDbFriendlyTableName(region + ".cpm")
