- Timestamp:
- Jul 28, 2014, 6:20:27 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140717/ippToPsps
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
jython/stackbatch.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/ippToPsps
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140717/ippToPsps/jython/stackbatch.py
r36744 r37129 39 39 scratchDb, 40 40 skyID, 41 batchID, 42 useFullTables): 41 batchID): 43 42 44 43 super(StackBatch, self).__init__( … … 52 51 batchID, 53 52 "ST", 54 "", 55 #gpc1Db.getStackStageCmf(skychunk.dvoLabel, stackID), 56 useFullTables) 57 58 # self.printline = 0 59 # # self.testprint() 60 # self.logger.infoPair("did I get", "here"); 53 None) 54 61 55 self.stackType = "DEEP_STACK" # TODO 62 56 ## = stuff I commented out for pv2 stacks … … 215 209 self.scratchDb.dropTable("StackObject") 216 210 self.logger.infoPair("dropping table:","StackModelFit") 217 211 self.scratchDb.dropTable("SkinnyObject") 218 212 self.scratchDb.dropTable("StackModelFit") 219 213 self.logger.infoPair("dropping table:","StackApFlx") … … 262 256 # insert what we know about this stack batch into the stack table 263 257 self.ippToPspsDb.insertStackMeta(self.batchID, "x" , self.stackType) 264 265 # insert sourceID/imageID combo so DVO can look it up266 ##if not self.useFullTables:267 ## self.scratchDb.insertNewDvoExternID(self.header['SOURCEID'], self.header['IMAGEID'])268 269 # self.testprint()270 258 271 259 # dump stuff to log … … 785 773 self.logger.infoPair("Deleting", "entries with StackObject.objID = 0") 786 774 # response = raw_input("deleted objID is 0 ") 787 775 ''' 776 Populates the SkinnyObject table 777 ''' 778 def populateSkinnyObject(self): 779 780 self.logger.infoPair("Procesing table", "SkinnyObject") 781 782 sql = "INSERT INTO SkinnyObject (\ 783 objID \ 784 ,ippObjID \ 785 ,projectionCellID \ 786 ) \ 787 SELECT \ 788 DISTINCT objID \ 789 ,ippObjID \ 790 ,projectionCellID \ 791 FROM StackDetection" 792 self.scratchDb.execute(sql) 793 794 self.scratchDb.updateAllRows("SkinnyObject", "surveyID", str(self.surveyID)) 795 self.scratchDb.updateAllRows("SkinnyObject", "dataRelease", str(self.skychunk.dataRelease)) 796 788 797 789 798 ''' … … 1189 1198 self.logger.infoPair("starting","populatePspsTables"); 1190 1199 self.skipBatch = False 1191 if not self.useFullTables: 1192 if not self.getIDsFromDVO(): 1193 return False 1194 #do some basics first 1200 1201 # get the IDs from the DVO tables 1202 if not self.getIDsFromDVO(): 1203 return False 1204 1205 # do some basics first: 1195 1206 # populate stack meta per filter 1196 1207 # insert objid/stackdetectid per filter to each table … … 1307 1318 1308 1319 ##if self.totalDetections < 1: 1320 #self.logger.infoPair("populating","SkinnyObject") 1321 self.populateSkinnyObject() 1309 1322 1310 1323 ##self.logger.error("No detections to publish") … … 1314 1327 self.tablesToExport.append("StackModelFit") 1315 1328 self.tablesToExport.append("StackApFlx") 1316 1329 self.tablesToExport.append("SkinnyObject") 1317 1330 self.logger.infoPair("finishing","populatePspsTables"); 1318 1331 return True
Note:
See TracChangeset
for help on using the changeset viewer.
