IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 20, 2015, 1:19:35 PM (11 years ago)
Author:
heather
Message:

current state of ipptopsps / sas37 - ob/p2/st/df work

File:
1 edited

Legend:

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

    r37763 r37917  
    611611
    612612    def updatePspsUniqueIDs(self,table, ota):
    613         sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, objID from \
    614         (select @r:=0) r, "+table+" t) as foo using (objID) set \
    615         uniquePspsP2id = ((" +str(self.batchID)+ "*1000000000 ) \
    616         + (" +str(ota) + "*10000000  )+rownum)"
     613        #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, objID from \
     614        #(select @r:=0) r, "+table+" t) as foo using (objID) set \
     615        #uniquePspsP2id = ((" +str(self.batchID)+ "*1000000000 ) \
     616        #+ (" +str(ota) + "*10000000  )+rownum)"
     617        sql = "UPDATE "+table+" set uniquePspsP2id = (("+str(self.batchID)+"*1000000000 ) + (" +str(ota) + "*10000000  )+ row)"
    617618        try: self.scratchDb.execute(sql)
    618619        except:
     
    647648        #self.logger.info("successful populate ");
    648649        # now add DVO IDs
     650        self.logger.infoPair("Adding 'row' column to ", "Detection_"+chipname)
     651        #detection has a primary index, so don't add, use this one
     652        self.scratchDb.addRowCountColumnNoKey("Detection_"+chipname, "row")
    649653        self.updateDvoIDs("Detection_" + chipname, self.imageIDs[chipname])
    650654        #self.logger.info("updated dvoids")
    651655        results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID")
    652656        #self.logger.info("deleted nulls")
     657
     658        ota = x*10+y
     659
     660
    653661        self.logger.info("add psps unique p2 ids")
    654         ota = x*10+y
    655662        self.updatePspsUniqueIDs("Detection_" + chipname, ota)
     663        self.logger.infoPair("Dropping 'row' column from ", "Detection_"+chipname)
     664        self.scratchDb.dropColumn("Detection_"+chipname,"row")
    656665        self.updateImageID("Detection_" + chipname, x, y)
    657666        #self.logger.info("updateImageId")
Note: See TracChangeset for help on using the changeset viewer.