Changeset 38995 for trunk/ippToPsps/jython/batch.py
- Timestamp:
- Oct 28, 2015, 8:29:33 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r38990 r38995 453 453 ''' 454 454 def importIppTables(self, columns="*", filter=""): 455 if self. useOhanaMYSQLtoFITS:455 if self.config.useOhanaMYSQLtoFITS: 456 456 if not self.importIppTablesOhana(): 457 457 self.logger.errorPair("problem running", "importIppTablesOhana") … … 480 480 return False 481 481 482 self.scratchDb.loadFITStoMYSQL(self.fits.getPath() , "none")482 self.scratchDb.loadFITStoMYSQL(self.fits.getPath()) 483 483 484 484 ## may need to do this with direct sql: … … 515 515 def importIppTablesStilts(self, columns="*", filter=""): 516 516 517 self.logger.infoPair("Importing tables with filter", filter)517 self.logger.infoPair("Importing tables (stilts) with filter", filter) 518 518 519 #print "trying to read ", self.fits.getPath()519 print "trying to read ", self.fits.getPath() 520 520 521 521 try: … … 527 527 self.tablesLoaded = [] 528 528 529 print "read tables from ", self.fits.getPath() 530 529 531 count = 0 530 532 for table in tables: 531 533 532 534 # example of listing all columns in a table: 533 ##print "-----table: " + table.name534 ## columns = table.columns()535 ## for column in columns:536 ##print column537 ##538 ## print "-----" 539 540 # print "import smf table ", table 535 print "-----table: " + table.name 536 myColumns = table.columns() 537 for column in myColumns: 538 print column 539 print "-----" 540 541 print "import smf table ", table.name 542 541 543 match = re.match(filter, table.name) 542 544 if not match: continue … … 555 557 self.logger.debug("Removing Infinity values from all columns") 556 558 table = stilts.tpipe(table, cmd='keepcols "' + columns + '"') 559 print "-----" 557 560 table = stilts.tpipe(table, cmd='replaceval -Infinity null *') 561 print "-----" 558 562 table = stilts.tpipe(table, cmd='replaceval Infinity null *') 559 # print "cleaned up values ", table563 print "cleaned up values ", table.name 560 564 561 565 try:
Note:
See TracChangeset
for help on using the changeset viewer.
