Index: trunk/ippToPsps/jython/dvo.py
===================================================================
--- trunk/ippToPsps/jython/dvo.py	(revision 36447)
+++ trunk/ippToPsps/jython/dvo.py	(revision 37246)
@@ -50,12 +50,11 @@
         self.regionsIngestedButOutOfDate = []
        
-        # we have (still) 3 modes of ingest from dvo cpt/cps/cpm files 
-        # 1) dvograbber (useFullTables == FALSE), 
+        # we USED TO have 3 modes of ingest from dvo cpt/cps/cpm files 
+        # 1) dvograbber (useStilts == TRUE, useFullTables == FALSE), 
         # 2) jython/stilts (useStilts == TRUE, useFullTables == TRUE)
-        # 3) dvopsps (useStilts == FALSE, useFullTables == TRUE)
+        # 3) dvopsps (useStilts == FALSE, useFullTables == FALSE)
         # my goal (EAM, 2013/01/31) is to migrate to only dvopsps
 
-        self.useStilts = 0
-        self.scratchDb.setUseFullTables(True)
+        self.scratchDb.setDvoTableNames()
 
         # decide if we are using the right DVO for this scratchDb
@@ -64,5 +63,4 @@
         # this scratch Db either has no DVO info ingested, or a different DVO ingested. Prompt user
         if not self.correctDvo:
-            print "*******************************************************************************"
             self.logger.warning("switching to a new dvo: '" + self.skychunk.dvoLocation + "'")
             # response = raw_input("(y/n) ")
@@ -104,4 +102,8 @@
         # go no further if we've already partly ingested a different DVO
         if not self.correctDvo: return
+
+        if (self.skychunk.dvoLocation == 'none'):
+            # print "do not load Photcodes for place-holder DVO " + self.skychunk.dvoLocation
+            return False
 
         # check if we have up-to-date version
@@ -156,4 +158,8 @@
         if not self.correctDvo: return False
 
+        if (self.skychunk.dvoLocation == 'none'):
+            # print "do not load SkyTable for place-holder DVO " + self.skychunk.dvoLocation
+            return False
+
         path =  self.skychunk.dvoLocation + "/SkyTable.fits"
         if self.scratchDb.alreadyImportedThisDvoTable(path): 
@@ -164,35 +170,27 @@
         self.logger.infoPair("DVO SkyTable.fits file", "NOT up-to-date")        
 
-        if self.useStilts:
-            self.importFits(
-                path,
-                "R_MIN R_MAX D_MIN D_MAX INDEX NAME",
-                self.scratchDb.dvoSkyTable)
-        else:
-            
-            # create dvoSkyTable 
-            sql = "drop TABLE dvoSkyTable"
-            try:
-                self.scratchDb.execute(sql)
-            except: pass
-
-            # create dvoSkyTable 
-            sql = "CREATE TABLE dvoSkyTable (R_MIN REAL, R_MAX REAL, D_MIN REAL, D_MAX REAL, INDEX_ INT, NAME CHAR(18))"
-            self.scratchDb.execute(sql)
-
-            # TODO path to DVO prog hardcoded temporarily
-            cmd = "dvopsps skytable"
-            cmd += " -dbhost " + self.scratchDb.dbHost
-            cmd += " -dbname " + self.scratchDb.dbName
-            cmd += " -dbuser " + self.scratchDb.dbUser
-            cmd += " -dbpass " + self.scratchDb.dbPass
-            cmd += " -D CATDIR " + self.skychunk.dvoLocation
-
-            self.logger.infoPair("Running dvopsps", cmd)
-            p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
-            p.wait()
-            if p.returncode != 0:
-                self.logger.errorPair("dvopsps failed on SkyTable.fits for ", self.skychunk.dvoLocation)
-                raise
+        # drop dvoSkyTable (if it exists)
+        sql = "drop TABLE dvoSkyTable"
+        try: self.scratchDb.execute(sql)
+        except: pass
+
+        # create dvoSkyTable 
+        sql = "CREATE TABLE dvoSkyTable (R_MIN REAL, R_MAX REAL, D_MIN REAL, D_MAX REAL, INDEX_ INT, NAME CHAR(18))"
+        self.scratchDb.execute(sql)
+
+        # TODO path to DVO prog hardcoded temporarily
+        cmd = "dvopsps skytable"
+        cmd += " -dbhost " + self.scratchDb.dbHost
+        cmd += " -dbname " + self.scratchDb.dbName
+        cmd += " -dbuser " + self.scratchDb.dbUser
+        cmd += " -dbpass " + self.scratchDb.dbPass
+        cmd += " -D CATDIR " + self.skychunk.dvoLocation
+
+        self.logger.infoPair("Running dvopsps", cmd)
+        p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
+        p.wait()
+        if p.returncode != 0:
+            self.logger.errorPair("dvopsps failed on SkyTable.fits for ", self.skychunk.dvoLocation)
+            raise
 
         self.logger.infoPair("Adding index to", self.scratchDb.dvoSkyTable)
@@ -268,20 +266,4 @@
            regionDec = region[2]
            regionPath = region[3]
-
-           # get paths for this region for the file types we are interested in
-           # XXX ipptopsps cannot check files -- it does not know where they are
-           ## paths = []
-           ## for fileType in self.ingestFileTypes:
-           ##     paths.append(self.skychunk.dvoLocation + "/" + regionPath + "." + fileType)
-
-           # check for the existence of all interested file types
-           # XXX ipptopsps cannot check files -- it does not know where they are
-           ## skipThisRegion = False
-           ## for path in paths:
-           ##     if not os.path.isfile(path):
-           ##         skipThisRegion = True
-           ##         break
-
-           ## if skipThisRegion: continue
 
            # ok, have real, populated files so add this region to the list
@@ -680,12 +662,21 @@
                 useP2 = 1
 
-        if (useP2 ==0 and useST ==1):
-            #grab only stacks
-            cmd += " -photcode-start 11000 -photcode-end 11500"
-
-        if (useP2 ==1 and useST==0):
-            #grabd only P2s    
-            cmd += " -photcode-start 10000 -photcode-end 10577"
-
+        if (useP2 == 0 and useST == 1):
+            # grab only stacks
+            if (self.config.camera == "simtest"):
+                # SIMTEST.x.SkyChip
+                cmd += " -photcode-start 14100 -photcode-end 14500"
+            else:
+                # not gpc1test -> GPC1.x.SkyShip
+                cmd += " -photcode-start 11000 -photcode-end 11500"
+
+        if (useP2 == 1 and useST == 0):
+            # grab only P2s (4000-4500 are test cameras, SIMTEST and SIMMOSAIC)
+            if (self.config.camera == "simtest"):
+                # SIMTEST.x.Chip
+                cmd += " -photcode-start  4100 -photcode-end 4500"
+            else:
+                # not gpc1test -> GPC1.x.XYnn
+                cmd += " -photcode-start 10000 -photcode-end 10577"
 
         self.logger.infoPair("Running dvopsps", cmd)
