Index: /trunk/ippToPsps/jython/gpc1db.py
===================================================================
--- /trunk/ippToPsps/jython/gpc1db.py	(revision 31845)
+++ /trunk/ippToPsps/jython/gpc1db.py	(revision 31846)
@@ -20,6 +20,6 @@
     Constructor
     '''
-    def __init__(self, logger):
-        super(Gpc1Db, self).__init__(logger,"gpc1database")
+    def __init__(self, logger, doc):
+        super(Gpc1Db, self).__init__(logger, doc, "gpc1database")
 
     '''
@@ -76,6 +76,6 @@
             stage = "staticsky"
             sql = "SELECT DISTINCT stack_id \
-                   FROM gpc1.staticskyInput \
-                   JOIN gpc1.addRun ON(gpc1.staticskyInput.sky_id = gpc1.addRun.stage_id) \
+                   FROM staticskyInput \
+                   JOIN addRun ON(staticskyInput.sky_id = addRun.stage_id) \
                    WHERE stage = '" + stage + "' \
                    AND dvodb = '" + dvoDb + "'"
@@ -215,5 +215,5 @@
         if len(files) < 1: return "NULL"
 
-        return files[0] # TODO just returning first file - check
+        return Fits(self.logger, self.doc, files[0]) # TODO just returning first file - check
 
 
@@ -241,9 +241,9 @@
 
                 path = i.rstrip()
-                fits = Fits(self.logger, path)
+                fits = Fits(self.logger, self.doc, path)
 
                 # we need to check if this is the correct cmf file, and if so then break and return
                 if fits.getPrimaryHeaderValue("STK_ID") == str(stackID):
-                    return path
+                    return fits
 
         except:
