IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 7, 2014, 5:36:39 AM (12 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140423/ippToPsps/jython/ipptopspsdb.py

    r36201 r36826  
    11161116        ,queue_ST \
    11171117        ,queue_OB \
     1118        ,queue_DF \
     1119        ,queue_DO \
     1120        ,queue_FW \
     1121        ,queue_FO \
    11181122        ,parallel \
    11191123        ,P2_smf_version \
     
    11621166            if rs.getInt(20) == 1: self.skychunk.batchTypes.append("ST")
    11631167            if rs.getInt(21) == 1: self.skychunk.batchTypes.append("OB")
     1168            if rs.getInt(22) == 1: self.skychunk.batchTypes.append("DF")
     1169            if rs.getInt(23) == 1: self.skychunk.batchTypes.append("DO")
     1170            if rs.getInt(24) == 1: self.skychunk.batchTypes.append("FW")
     1171            if rs.getInt(25) == 1: self.skychunk.batchTypes.append("FO")
    11641172
    11651173            self.skychunk.force = True # TODO
    11661174            self.skychunk.parallel = False # TODO
    11671175
    1168             if rs.getInt(22) == 1: self.skychunk.parallel = True
    1169             self.skychunk.P2_smf_version = rs.getString(23)
    1170             self.skychunk.ST_cmf_version = rs.getString(24)
    1171             self.skychunk.trange_start = rs.getString(25)
    1172             self.skychunk.trange_end = rs.getString(26)
     1176            if rs.getInt(26) == 1: self.skychunk.parallel = True
     1177            self.skychunk.P2_smf_version = rs.getString(27)
     1178            self.skychunk.ST_cmf_version = rs.getString(28)
     1179            self.skychunk.trange_start = rs.getString(29)
     1180            self.skychunk.trange_end = rs.getString(30)
    11731181
    11741182            if self.skychunk.parallel: print "USING parallel"
     
    16431651        # self.logger.infoPair("Items written to alt Db", "%d" % count)
    16441652
     1653
     1654    '''
     1655    Creates a temporary table and shoves it full of stage_ids and ra/dec coords
     1656    '''
     1657    def storeAllItemsInDvodb(self, rows, dvo_db, batchType):
     1658
     1659        #try:
     1660        #    self.execute("DROP TABLE all_pending")
     1661        #except:
     1662        #    pass
     1663
     1664        #self.execute("CREATE TEMPORARY TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)")
     1665        for row in rows:
     1666
     1667            try:
     1668                uniq = dvo_db + "."+ batchType + "." + str(row[0])
     1669                sql = "INSERT INTO dvodb (dvo_db, batch_type, stage_id, ra_center, dec_center, uniq_key) \
     1670                       VALUES ( '" + dvo_db + "', '" + batchType + "'," + str(row[0]) + "," + str(row[1]) + " \
     1671                       , " + str(row[2]) + ", '"+uniq+"' ) "
     1672                print "sql 1: ", sql
     1673                self.execute(sql)
     1674            except: continue
     1675
     1676        #count = self.getRowCount("all_pending")
     1677        #self.logger.infoPair("Items written to Db", "%d" % count)
     1678
     1679
     1680
    16451681    '''
    16461682    Gets all items in the all_pending temporary table within the bounds of this box
Note: See TracChangeset for help on using the changeset viewer.