Beispiel #1
0
    def handle(self, fitsInfo):
        keywords = fitsInfo[0].header
        flux = fitsInfo[0].data[0]

        ra = astroUtil.getKeyword(keywords, 'RA')
        dec = astroUtil.getKeyword(keywords, 'DEC')

        if ra == 0 or dec == 0:
            return

        self.output.write(ra + " " + dec)
        self.output.write("\n")
        self.count += 1
Beispiel #2
0
    def handle(self, fitsInfo):
        keywords = fitsInfo[0].header
        classType = astroUtil.getKeyword(keywords, "CLASS", "1D_CLASS")

        if classType == "SKY":
            return

        ra = astroUtil.getKeyword(keywords, 'RA')
        dec = astroUtil.getKeyword(keywords, 'DEC')
        subClass = astroUtil.getKeyword(keywords, "SUBCLASS", "1D_SUBCL")
        mainClass = astroUtil.getMainClass(classType, subClass)
        date = astroUtil.getKeyword(keywords, "DATE-OBS")[0:10]
        planID = astroUtil.getKeyword(keywords, "PLANID")

        z = astroUtil.getKeyword(keywords, "Z", "1D_Z")
        z_err = astroUtil.getKeyword(keywords, "1D_Z_ERR", "Z_ERR")
        version_idl = astroUtil.getKeyword(keywords, "VERSIDL")
        version_ppl = astroUtil.getKeyword(keywords, "VERS2D", "VERSPIPE")

        SN_U = astroUtil.getKeyword(keywords, "SN_U")
        SN_G = astroUtil.getKeyword(keywords, "SN_G")
        SN_R = astroUtil.getKeyword(keywords, "SN_R")
        SN_I = astroUtil.getKeyword(keywords, "SN_I")
        SN_Z = astroUtil.getKeyword(keywords, "SN_Z")

        sqlRecord = [planID, version_idl, version_ppl, date, ra, dec,
                     classType, mainClass, subClass, z, z_err, SN_U, SN_G, SN_R, SN_I, SN_Z]
        sqlHelper.execWithValues(self.conn, self.sql_insert, sqlRecord)
        self.count += 1