Changeset 39544 for trunk/ippToPsps/jython/gpc1db.py
- Timestamp:
- Apr 19, 2016, 4:20:30 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/gpc1db.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/gpc1db.py
r39165 r39544 286 286 rs.close() 287 287 288 289 288 290 return addIDs 289 291 … … 331 333 self.logger.exception("Can't query for addIDs using :" + sql ) 332 334 335 333 336 addIDs = [] 334 337 while (rs.next()): … … 402 405 if not rs.first(): 403 406 self.logger.errorPair("Can't query for", "forced warp meta data") 407 self.logger.errorPair("this failed", sql) 408 404 409 os._exit(3) 405 410 … … 506 511 if len(files) < 1: return None 507 512 fits = Fits(self.logger, self.config, files[0]) 513 self.logger.infoPair("cmf file",files[0]) 508 514 return fits 509 515 … … 651 657 652 658 return imageIDs 659 660 661 662 ''' 663 Gets a list of PSPS image IDs for this diff ID 664 ''' 665 def getWarpSkyFileIDforThisAddIDforFW(self, addID): 666 667 self.logger.debug("Querying GPC1 for stage_extra1 for add ID: " + str(addID)) 668 669 670 sql = "select warp_skyfile_id from addRun join fullForceInput \ 671 on stage_id = ff_id and stage = 'fullforce' and stage_extra1 = warp_id \ 672 join fullForceRun using (ff_id) \ 673 join fullForceResult using (ff_id, warp_id) \ 674 JOIN skycalRun using (skycal_id) \ 675 join stackRun using (stack_id) \ 676 join warpImfile using (warp_id, skycell_id) \ 677 where add_id = "+str(addID) 678 try: 679 rs = self.executeQuery(sql) 680 except: 681 self.logger.infoPair("failed sql:",sql) 682 self.logger.exception("Can't query for imageIDs") 683 684 685 #imageIDs = [] 686 #while (rs.next()): 687 # imageIDs.append(rs.getString(1)) 688 #rs.close() 689 690 rs.first() 691 imageID=rs.getString(1) 692 rs.close() 693 return imageID 694 695 ''' 696 Gets a list of PSPS image IDs for this diff ID 697 ''' 698 def getWarpSkyFileIDforThisAddIDforST(self, addID): 699 700 self.logger.debug("Querying GPC1 for stage_extra1 for add ID: " + str(addID)) 701 702 703 sql = "select warp_skyfile_id from addRun join skycalRun \ 704 on stage_id = skycal_id and stage = 'skycal' \ 705 join stackRun using (stack_id) \ 706 join warpImfile using (warp_id, skycell_id) \ 707 where add_id = "+str(addID) 708 try: 709 rs = self.executeQuery(sql) 710 except: 711 self.logger.infoPair("failed sql:",sql) 712 self.logger.exception("Can't query for imageIDs") 713 714 715 #imageIDs = [] 716 #while (rs.next()): 717 # imageIDs.append(rs.getString(1)) 718 #rs.close() 719 720 rs.first() 721 imageID=rs.getString(1) 722 rs.close() 723 return imageID 653 724 654 725 … … 882 953 # if we get here, then the cmf is readable, now check the stack_id 883 954 fits = Fits(self.logger, self.config, files[0]) 955 print self.logger.infoPair("cmf file",files[0]) 884 956 return fits 885 957
Note:
See TracChangeset
for help on using the changeset viewer.
