Index: trunk/ippToPsps/jython/dvo.py
===================================================================
--- trunk/ippToPsps/jython/dvo.py	(revision 33962)
+++ trunk/ippToPsps/jython/dvo.py	(revision 34104)
@@ -111,5 +111,5 @@
         self.importFits(
                 path,
-                "CODE NAME",
+                "CODE NAME TYPE",
                 self.scratchDb.dvoPhotcodesTable)
         self.logger.infoPair("Adding primary key to", self.scratchDb.dvoPhotcodesTable)
Index: trunk/ippToPsps/jython/objectbatch.py
===================================================================
--- trunk/ippToPsps/jython/objectbatch.py	(revision 33962)
+++ trunk/ippToPsps/jython/objectbatch.py	(revision 34104)
@@ -105,5 +105,6 @@
     
         # get a count of the available filters
-        filterCount = len(filters)
+        filterCount = self.scratchDb.getCountOfFiltersFromPhotcodesTable()
+        # filterCount = len(filters)
 
         self.logger.infoPair("Available filters in Photcodes", filters)
Index: trunk/ippToPsps/jython/scratchdb.py
===================================================================
--- trunk/ippToPsps/jython/scratchdb.py	(revision 33962)
+++ trunk/ippToPsps/jython/scratchdb.py	(revision 34104)
@@ -544,7 +544,29 @@
 
     '''
+    Gets a count of average filters (secfilt) in the DVO Photcodes table
+    '''
+    def getCountOfFiltersFromPhotcodesTable(self):
+
+        # 2 is hardwired -- convert to an enum (should probably read Ohana/src/libdvo/include/dvo.h defines
+        sql = "SELECT count(TYPE) FROM " + self.dvoPhotcodesTable + " WHERE TYPE = 2"
+
+        filterCount = 0
+        try:
+            rs = self.executeQuery(sql)
+            row = 1
+            while (rs.next()):
+                filterCount = rs.getString(1)
+            rs.close()
+        except:
+            self.logger.errorPair("Could not get filter count", sql )
+
+        return filterCount
+
+    '''
     Gets a list of filters ordered as thy are in the DVO Photcodes table, as this reflects the order they apper in the cps file
     '''
     def getOrderedListOfFiltersFromPhotcodesTable(self, interestedFilters):
+
+        sql = "SELECT count(TYPE) FROM " + self.dvoPhotcodesTable + " WHERE TYPE = 'sec'"
 
         sql = "SELECT NAME FROM " + self.dvoPhotcodesTable + " WHERE "
