IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 29, 2013, 2:30:34 PM (13 years ago)
Author:
heather
Message:

this is whatever is current (or was currently used) for sas14. I assume its ok

File:
1 edited

Legend:

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

    r35311 r35605  
    785785                   survey, \
    786786                   dvo_db, \
    787                    datastore_product \
     787                   datastore_product, \
     788                   comment \
    788789                   ) VALUES ( \
    789790                       '" + batchType + "', \
     
    791792                       '" + self.skychunk.survey + "', \
    792793                       '" + self.skychunk.dvoLabel + "', \
    793                        '" + self.skychunk.datastoreProduct + "' \
     794                       '" + self.skychunk.datastoreProduct + "', \
     795                       '" + self.skychunk.name + "' \
    794796                       )"
    795797            self.logger.infoPair("heather:","sql")
     
    12151217                   ('" + self.skychunk.name + "', " + str(ra) + ", " + str(dec) + ", " + str(self.skychunk.boxSize) + ")"
    12161218
     1219            # print "insertBox: ", sql
     1220
    12171221            self.execute(sql)
    12181222            id = self.getBoxId(ra, dec)
     
    15561560
    15571561        sql = "SELECT id, ra_center, dec_center \
    1558                FROM box \
    1559                WHERE skychunk = '" + self.skychunk.name + "' \
     1562               FROM box join skychunk on box.skychunk = skychunk.name \
     1563               WHERE dvo_label = '" + self.skychunk.dvoLabel + "' \
    15601564               ORDER BY ra_center, dec_center"
    15611565
     
    15991603                sql = "INSERT INTO all_pending (stage_id, ra_bore, dec_bore) \
    16001604                       VALUES (%d, %f, %f)" % (row[0], row[1], row[2])
     1605                # print "sql 1: ", sql
    16011606                self.execute(sql)
    16021607            except: continue
     
    16041609        count = self.getRowCount("all_pending")
    16051610        self.logger.infoPair("Items written to Db", "%d" % count)
     1611
     1612        # try:
     1613        #     self.execute("DROP TABLE all_pending_alt")
     1614        # except:
     1615        #     pass
     1616        #
     1617        # self.execute("CREATE TABLE all_pending_alt (stage_id bigint(20), ra_bore float, dec_bore float)")
     1618        # for row in rows:
     1619        #     try:
     1620        #         sql = "INSERT INTO all_pending_alt (stage_id, ra_bore, dec_bore) \
     1621        #                VALUES (%d, %f, %f)" % (row[0], row[1], row[2])
     1622        #         print "sql 2: ", sql
     1623        #         self.execute(sql)
     1624        #     except: continue
     1625        #
     1626        # count = self.getRowCount("all_pending_alt")
     1627        # self.logger.infoPair("Items written to alt Db", "%d" % count)
    16061628
    16071629    '''
     
    16241646               AND dec_bore BETWEEN " + str(minDEC) + " AND " + str(maxDEC)
    16251647
     1648        print "items: ", sql
     1649
    16261650        try:
    16271651            rs = self.executeQuery(sql)
Note: See TracChangeset for help on using the changeset viewer.