IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 8, 2011, 2:55:46 PM (15 years ago)
Author:
rhenders
Message:

now taking config XML doc as constructor arg, and passing it to Fits constructor; using Fits class when getting smf or cmf files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/gpc1db.py

    r31831 r31846  
    2020    Constructor
    2121    '''
    22     def __init__(self, logger):
    23         super(Gpc1Db, self).__init__(logger,"gpc1database")
     22    def __init__(self, logger, doc):
     23        super(Gpc1Db, self).__init__(logger, doc, "gpc1database")
    2424
    2525    '''
     
    7676            stage = "staticsky"
    7777            sql = "SELECT DISTINCT stack_id \
    78                    FROM gpc1.staticskyInput \
    79                    JOIN gpc1.addRun ON(gpc1.staticskyInput.sky_id = gpc1.addRun.stage_id) \
     78                   FROM staticskyInput \
     79                   JOIN addRun ON(staticskyInput.sky_id = addRun.stage_id) \
    8080                   WHERE stage = '" + stage + "' \
    8181                   AND dvodb = '" + dvoDb + "'"
     
    215215        if len(files) < 1: return "NULL"
    216216
    217         return files[0] # TODO just returning first file - check
     217        return Fits(self.logger, self.doc, files[0]) # TODO just returning first file - check
    218218
    219219
     
    241241
    242242                path = i.rstrip()
    243                 fits = Fits(self.logger, path)
     243                fits = Fits(self.logger, self.doc, path)
    244244
    245245                # we need to check if this is the correct cmf file, and if so then break and return
    246246                if fits.getPrimaryHeaderValue("STK_ID") == str(stackID):
    247                     return path
     247                    return fits
    248248
    249249        except:
Note: See TracChangeset for help on using the changeset viewer.