Changeset 38358 for trunk/ippToPsps/jython/stackbatch.py
- Timestamp:
- Jun 3, 2015, 11:23:52 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/stackbatch.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/stackbatch.py
r38095 r38358 169 169 170 170 self.dropTableVerbose("StackApFlx") 171 self.dropTableVerbose("StackApFlxE GUnc")172 self.dropTableVerbose("StackApFlxE GCon6")173 self.dropTableVerbose("StackApFlxE GCon8")171 self.dropTableVerbose("StackApFlxExGalUnc") 172 self.dropTableVerbose("StackApFlxExGalCon6") 173 self.dropTableVerbose("StackApFlxExGalCon8") 174 174 175 175 self.dropTableVerbose("StackPetrosian") … … 360 360 sqlLine.group("a."+filter+"raErr", "b.X_PSF_SIG * b.PLTSCALE") 361 361 sqlLine.group("a."+filter+"decErr", "b.Y_PSF_SIG * b.PLTSCALE") 362 sqlLine.group("a."+filter+"sky", "b.SKY / " + str(exptime))363 sqlLine.group("a."+filter+"skyErr", "b.SKY_SIGMA / " + str(exptime))362 # sqlLine.group("a."+filter+"sky", "b.SKY / " + str(exptime)) 363 # sqlLine.group("a."+filter+"skyErr", "b.SKY_SIGMA / " + str(exptime)) 364 364 sqlLine.group("a."+filter+"infoFlag", "b.FLAGS") 365 365 sqlLine.group("a."+filter+"infoFlag2", "b.FLAGS2 | a."+filter+"infoFlag2") … … 451 451 sqlLine.group("a."+filter+"PlateScale", "b.PLTSCALE") 452 452 sqlLine.group("a."+filter+"ExtNSigma", "b.EXT_NSIGMA") 453 453 sqlLine.group("a."+filter+"sky", "b.SKY / " + str(exptime)) 454 sqlLine.group("a."+filter+"skyErr", "b.SKY_SIGMA / " + str(exptime)) 454 455 sql = sqlLine.makeEquals("WHERE a." + filter + "ippDetectID = b.IPP_IDET") 455 456 … … 484 485 ''' 485 486 def populateStackModelFitExtra(self): 487 tablename = "StackModelFitExtra" 486 488 487 489 self.logger.infoPair("Procesing table", "StackModelFitExtra") 488 490 self.insertDvoIDs("StackModelFitExtra", "StackObjectThin") 491 self.scratchDb.createIndex(tablename, "objID") 489 492 490 493 # if we are going to add a key, do it here so it is useful 491 494 # self.scratchDb.createIndex(tablename, "objID") 495 496 #objid 497 #uniquepsps id 498 # ippobjid 499 # randomstackobjid 500 # stackdetectrowid 501 # primarydetection 502 #bestdetection 503 504 #g / r / i /z / y 505 506 self.logger.infoPair("inserting filter dependent cmf items into", tablename) 507 for filter in self.filters: 508 self.logger.infoPair("filter", filter) 509 510 stackID = self.stackIDs[filter] 511 self.logger.infoPair(filter + "stackID = ", stackID) 512 513 if stackID <= 0: 514 self.logger.infoPair("no stack data for filter" , filter) 515 continue 516 517 header = self.headerSet[filter] 518 exptime = self.getKeyFloat(header, "%.5f", "EXPTIME") 519 520 # insert all the detections 521 sqlLine = sqlUtility("UPDATE " + tablename + " AS a , " + filter + "SkyChip_xsrc AS b SET") 522 523 sqlLine.group("a."+filter+"haveData", "'1'") 524 sqlLine.group("a."+filter+"S2", "b.G_S2") 525 sqlLine.group("a."+filter+"logRT", "b.G_RT") 526 sqlLine.group("a."+filter+"logRA", "b.G_RA") 527 # sqlLine.group("a."+filter+"logC", "b.G_C") 528 sqlLine.group("a."+filter+"logA", "b.G_A") 529 530 sqlLine.group("a."+filter+"bumpy", "b.G_BUMPY") 531 sqlLine.group("a."+filter+"halfLightRad", "b.HALF_LIGHT_RADIUS") 532 sql = sqlLine.makeEquals("WHERE a." + filter + "ippDetectID = b.IPP_IDET") 533 534 try: 535 self.scratchDb.execute(sql) 536 except: 537 self.logger.errorPair('failed sql',sql) 538 raise 539 540 self.deleteRowsWithNoStackData(tablename) 541 self.tablesToExport.append(tablename) 542 543 544 545 # gippdetectic 546 # gstackmeta 547 # gS2 548 # glogRT 549 # glogRA 550 # glogC 551 # glogA 552 # gbumpy 553 # ghalfLightRad 554 555 556 557 558 559 560 492 561 493 562 # currently, none of the fields defined by the table are generated … … 735 804 Populates the StackApFlxEG table 736 805 ''' 737 def populateStackApFlxE G(self, version):738 739 tablename = "StackApFlxE G" + version806 def populateStackApFlxExGal(self, version): 807 808 tablename = "StackApFlxExGal" + version 740 809 741 810 if self.config.camera == "simtest": … … 794 863 if radius < minRadius: continue 795 864 if radius > maxRadius: continue 796 sqlLine.group(filter + prefix + "flxR" + str(radius), "-999") 797 sqlLine.group(filter + prefix + "flxR" + str(radius) + "Err", "-999") 798 sqlLine.group(filter + prefix + "flxR" + str(radius) + "Std", "-999") 799 sqlLine.group(filter + prefix + "flxR" + str(radius) + "Fill", "-999") 865 pspsRadius = radius + 2 866 sqlLine.group(filter + prefix + "flxR" + str(pspsRadius), "-999") 867 sqlLine.group(filter + prefix + "flxR" + str(pspsRadius) + "Err", "-999") 868 sqlLine.group(filter + prefix + "flxR" + str(pspsRadius) + "Std", "-999") 869 sqlLine.group(filter + prefix + "flxR" + str(pspsRadius) + "Fill", "-999") 800 870 801 871 sql = sqlLine.makeEquals("") … … 1118 1188 self.populateStackApFlx() 1119 1189 1120 self.populateStackApFlxE G("Unc")1121 self.populateStackApFlxE G("Con6")1122 self.populateStackApFlxE G("Con8")1190 self.populateStackApFlxExGal("Unc") 1191 self.populateStackApFlxExGal("Con6") 1192 self.populateStackApFlxExGal("Con8") 1123 1193 1124 1194 # delete rows with no content. for the other tables, this is done in
Note:
See TracChangeset
for help on using the changeset viewer.
