IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 28, 2015, 8:29:33 PM (11 years ago)
Author:
eugene
Message:

add -stilts option; fix stilts and regex for detectionbatch; add tableprefix option for stacks; alter photcode.type to type_as_int

File:
1 edited

Legend:

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

    r38990 r38995  
    453453    '''
    454454    def importIppTables(self, columns="*", filter=""):
    455         if self.useOhanaMYSQLtoFITS:
     455        if self.config.useOhanaMYSQLtoFITS:
    456456            if not self.importIppTablesOhana():
    457457                self.logger.errorPair("problem running", "importIppTablesOhana")
     
    480480            return False
    481481
    482         self.scratchDb.loadFITStoMYSQL(self.fits.getPath(), "none")
     482        self.scratchDb.loadFITStoMYSQL(self.fits.getPath())
    483483
    484484        ## may need to do this with direct sql:
     
    515515    def importIppTablesStilts(self, columns="*", filter=""):
    516516       
    517         self.logger.infoPair("Importing tables with filter", filter)
     517        self.logger.infoPair("Importing tables (stilts) with filter", filter)
    518518       
    519         # print "trying to read ", self.fits.getPath()
     519        print "trying to read ", self.fits.getPath()
    520520
    521521        try:
     
    527527        self.tablesLoaded = []
    528528
     529        print "read tables from ", self.fits.getPath()
     530
    529531        count = 0
    530532        for table in tables:
    531533
    532534            # example of listing all columns in a table:
    533             ## print "-----table: " + table.name
    534             ## columns = table.columns()
    535             ## for column in columns:
    536             ##     print column
    537             ##
    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
    541543            match = re.match(filter, table.name)
    542544            if not match: continue
     
    555557            self.logger.debug("Removing Infinity values from all columns")
    556558            table = stilts.tpipe(table, cmd='keepcols "' + columns + '"')
     559            print "-----"
    557560            table = stilts.tpipe(table, cmd='replaceval -Infinity null *')
     561            print "-----"
    558562            table = stilts.tpipe(table, cmd='replaceval Infinity null *')
    559             # print "cleaned up values ", table
     563            print "cleaned up values ", table.name
    560564
    561565            try:
Note: See TracChangeset for help on using the changeset viewer.