IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 29, 2015, 4:10:00 PM (11 years ago)
Author:
eugene
Message:

poisoned jython/dvodetections.py and jython/dvoforceddetections.py which are not used any more; added jython/dvoforcedgalaxy.py; cleaned up jython/dvoforcedobjects.py, jython/forcedgalaxybatch.py, jython/forcedobjectbatch.py

File:
1 edited

Legend:

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

    r38884 r39007  
    114114        return True
    115115
    116 
    117116    '''
    118117    Updates table and generates pspsuniqueids
     
    125124            self.logger.errorPair('failed sql',sql)
    126125            raise
    127 
    128 
    129 
    130126
    131127    '''
     
    195191                   SET " + filter[1] + "PSFMagErr = null \
    196192                   WHERE " + filter[1] + "PSFMagErr > " + str(cut)
    197 # taking out the cut since this is for mag, not flux
    198 
    199     #       try: self.scratchDb.execute(sql)
    200      #       except:
    201      #           self.logger.errorPair("failed setting null meanmagerr","ForcedMeanObject")
    202      #           raise
     193
     194            # NOTE: taking out the cut since this is for mag, not flux
     195            # try: self.scratchDb.execute(sql)
     196            # except:
     197            # self.logger.errorPair("failed setting null meanmagerr","ForcedMeanObject")
     198            # raise
     199
    203200        self.logger.infoPair("Calculating nDetections from", "n[filters]")
    204201        for filter in filters:
     
    275272                   " + cpyTable + " AS cpy ON (cpy.row = (ForcedMeanLensing.row* " + str(filterCount) + ")-(" + str(filterCount) + " - " + str(filter[0]) + ")) \
    276273                   SET \
    277                    ForcedMeanLensing." + filter[1] + "LensObjSmearX11 =  X11_SM_OBJ \
     274                   ForcedMeanLensing."  + filter[1] + "LensObjSmearX11 =  X11_SM_OBJ \
    278275                   ,ForcedMeanLensing." + filter[1] + "LensObjSmearX12 =  X12_SM_OBJ \
    279276                   ,ForcedMeanLensing." + filter[1] + "LensObjSmearX22 =  X22_SM_OBJ \
     
    321318        sqlLine = sqlUtility("INSERT INTO ForcedMeanObject (")
    322319
    323         sqlLine.group("objID",           "EXT_ID")
    324         sqlLine.group("ippObjID",        "OBJ_ID + (CAT_ID << 32)") # NOTE: shift by 32 bits exactly
    325         sqlLine.group("batchID",         "'" + str(self.batchID) + "'")
    326         sqlLine.group("randomForcedObjID",        "RAND("+str(self.batchID)+")")
    327         sqlLine.group("nDetections",      "'0'")
    328         sqlLine.group("processingVersion",   str(self.skychunk.processingVersion))
     320        sqlLine.group("objID",             "EXT_ID")
     321        sqlLine.group("ippObjID",          "OBJ_ID + (CAT_ID << 32)") # NOTE: shift by 32 bits exactly
     322        sqlLine.group("batchID",           "'" + str(self.batchID) + "'")
     323        sqlLine.group("randomForcedObjID", "RAND("+str(self.batchID)+")")
     324        sqlLine.group("nDetections",       "'0'")
     325        sqlLine.group("processingVersion", str(self.skychunk.processingVersion))
     326
    329327        sql = sqlLine.makeRaw(") SELECT ", " FROM " + cptTableName)
    330328
     
    344342        self.updatePspsUniqueIDs()
    345343
    346 
    347344        self.logger.infoPair("update ForcedMeanObject from ","cps table")
    348345        self.updateForcedMeanObjectFromCps(cpsTableName)
     
    350347        sqlLine = sqlUtility("INSERT INTO ForcedMeanLensing (")
    351348
    352         sqlLine.group("objID",           "objID")
    353         sqlLine.group("uniquePspsFOid","uniquePspsFOid")
     349        sqlLine.group("objID",            "objID")
     350        sqlLine.group("uniquePspsFOid",   "uniquePspsFOid")
    354351        sqlLine.group("randomForcedObjID","randomForcedObjID")
    355         sqlLine.group("ippObjID",        "ippObjID")
    356         sqlLine.group("batchID",         "batchID")
     352        sqlLine.group("ippObjID",         "ippObjID")
     353        sqlLine.group("batchID",          "batchID")
    357354        sqlLine.group("nDetections",      "nDetections")
    358         sqlLine.group("processingVersion",   str(self.skychunk.processingVersion))
     355        sqlLine.group("processingVersion", str(self.skychunk.processingVersion))
    359356
    360357        sql = sqlLine.makeRaw(") SELECT ", " FROM ForcedMeanObject")
     
    375372        self.logger.infoPair("Dropping row column from", "ForcedMeanObject table")
    376373        self.scratchDb.dropColumn("ForcedMeanObject", "row")
     374
    377375        self.logger.infoPair("Dropping row column from", "ForcedMeanLensing table")
    378376        self.scratchDb.dropColumn("ForcedMeanLensing", "row")
     377
     378        ##Don't do this till after MeanObject
    379379        ##self.logger.infoPair("Purging from scratch Db", self.region + " region")
    380 
    381         ##Don't do this till after MeanObject
    382380        ##self.dvoForcedObjects.purgeRegion(self.region)
     381
    383382        self.logger.infoPair("setting minmaxobjid for ", "ForcedMeanObject table")
    384383        self.setMinMaxObjID(["ForcedMeanObject"])
     
    421420
    422421        self.dvoForcedObjects.purgeRegion(self.region)
    423 
    424         #this is abuse of something but this is how I get the object batches to crash to further investigate them
    425        
    426 #        rowCountAfter = self.scratchDb.getRowCount("Object")
    427422        return True
    428 #        return False
Note: See TracChangeset for help on using the changeset viewer.