Index: trunk/ippToPsps/jython/dvo.py
===================================================================
--- trunk/ippToPsps/jython/dvo.py	(revision 33183)
+++ trunk/ippToPsps/jython/dvo.py	(revision 33184)
@@ -46,9 +46,6 @@
         self.scratchDb = ScratchDb(logger, self.doc, 1)
 
-        # decide if we are using the right DVO
-        self.correctDvo = self.scratchDb.isThisDvoCurrentlyIngested(self.dvoLocation)
-
-        # using correct DVO, so now get up-to-date versions of Images and SkyTable tables
-        self.updateMetaTables()
+        # or decide if we are using the right DVO
+        self.correctDvo = self.scratchDb.isCorrectDvo(self.dvoLocation)
 
     '''
@@ -60,12 +57,4 @@
 
     '''
-    Updates two main meta tables, Images and SkyTable
-    '''
-    def updateMetaTables(self):
-
-        self.loadImages()
-        self.loadSkyTable()
-
-    '''
     Check we are importing the DVO currenly ingested
     '''
@@ -77,4 +66,5 @@
     '''
     def resetDetections(self):
+
         self.logger.infoPair("Resetting", "just detections")
         self.scratchDb.resetOnlyDetectionDvoTables()
@@ -173,8 +163,28 @@
 
     '''
+    Gets a bunch of region files from DVO for a RA/Dec box centered with these coords and with this side length PLUS a border
+    '''
+    def getRegionsInThisBoxWithBorder(self, regionsToIngest, regionsToPurge, ra=180., dec=0., side=181.0, border=0.):
+
+        halfSide = (side + (border*2.0)) /2.0
+        self.getRegions(regionsToIngest, regionsToPurge, ra-halfSide, ra+halfSide, dec-halfSide, dec+halfSide)
+    
+    '''
+    Gets a bunch of region files from DVO for a RA/Dec box centered with these coords and with this side length
+    '''
+    def getRegionsInThisBox(self, regionsToIngest, regionsToPurge, ra=180., dec=0., side=181.0):
+
+        halfSide = side/2.0
+        self.getRegions(regionsToIngest, regionsToPurge, ra-halfSide, ra+halfSide, dec-halfSide, dec+halfSide)
+    
+
+    '''
     Gets a bunch of region files from DVO for this RA/Dec box
     '''
     def getRegions(self, regionsToIngest, regionsToPurge, minRa=-1., maxRa=361., minDec=-91., maxDec=91):
     
+        # go no further if we've already partly ingested a different DVO
+        if not self.correctDvo: return
+
         if (maxRa - minRa <= 0) or (maxDec - minDec) <= 0:
             self.logger.errorPair("Zero range in either RA or Dec", 
@@ -225,5 +235,5 @@
         sizeOfRegionsToIngest = self.getFileSizeStr(self.getDiskSizeOfDvoRegions(regionsToIngest))
 
-        self.logger.infoTitle("DVO Overview") 
+        self.logger.infoTitle("Summary for this region") 
         self.logger.infoPair("RA range", "%.2f -> %.2f" % (minRa, maxRa))
         self.logger.infoPair("Dec range", "%.2f -> %.2f" % (minDec, maxDec))
@@ -240,4 +250,7 @@
     def purgeRegions(self, regions):
 
+        # go no further if we've already partly ingested a different DVO
+        if not self.correctDvo: return
+
         if len(regions) < 1: return
 
@@ -282,5 +295,7 @@
         if not self.correctDvo: return
 
-        self.updateMetaTables()
+        # update the two meta tables, Images and SkyTable
+        self.loadImages()
+        self.loadSkyTable()
 
         regionsToIngest = []
@@ -302,9 +317,9 @@
            cptTableName = self.scratchDb.getDbFriendlyTableName(region + ".cpt")
 
+           self.logger.infoTitle("Region: " + region)
+
            # if we have not already ingested the cpm table, then do it now
            if not self.scratchDb.alreadyImportedThisDvoTable(cpmPath):
    
-               self.logger.infoTitle("Region: " + region)
-
                # import cpm table and index
                self.importFits(
