Index: trunk/ippToPsps/jython/gpc1db.py
===================================================================
--- trunk/ippToPsps/jython/gpc1db.py	(revision 33145)
+++ trunk/ippToPsps/jython/gpc1db.py	(revision 33186)
@@ -32,7 +32,21 @@
 
     '''
+    Gets a list of ids in this DVO database for this stage, could be cam or staticsky, for a box with defined center and side length
+    '''
+    def getIDsInThisDVODbForThisStageInThisBox(self, dvoDb, batchType, ra=180., dec=0., side=181.):
+
+        halfSide = side/2.0
+        return self.getIDsInThisDVODbForThisStage(dvoDb, batchType, ra-halfSide, ra+halfSide, dec-halfSide, dec+halfSide)
+
+
+    '''
     Gets a list of ids in this DVO database for this stage, could be cam or staticsky, and a box can be defined with equatorial coordinates
     '''
     def getIDsInThisDVODbForThisStage(self, dvoDb, batchType, minRA=-999, maxRA=999, minDec=-999, maxDec=999):
+
+        self.logger.debugPair("GPC1 RA range", "%.2f -> %.2f" % (minRA, maxRA))
+        self.logger.debugPair("GPC1 Dec range", "%.2f -> %.2f" % (minDec, maxDec))
+
+        ids = []
 
         if batchType == "P2": # TODO define these someplace 
@@ -71,12 +85,10 @@
         try:
             rs = self.executeQuery(sql)
+            while (rs.next()): ids.append(rs.getInt(1))
+            rs.close()
         except:
             self.logger.exception("Can't query for ids in DVO")
-
-        ids = []
-        while (rs.next()):
-            ids.append(rs.getInt(1))
-
-        rs.close()
+            return ids
+
 
         self.logger.debug("Found %d items in DVO database '%s' for stage='%s'" % (len(ids), dvoDb, stage))
